Application crashes during GraphicsWindow method

Yeah, that line crashes because WindowGFX is NULL at that point, so you’re dereferencing a NULL pointer.