fixed bug that cause invaders sample to be unable to run

The program was trying to access a NULL pointer, so the program crashed during runtime. The following commit fixes this error.

VS2013, Windows 8.1