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