Prevent SIGFAULT when GetBuildTargets() returns empty array.

Signed-off-by: Jan Nemecek <Nemecek.Jan@seznam.cz>