As in "make sure it's not NULL before dereferencing it"? Because I really don't know why this function does what it does. I heard the render window could be embedded into the main window so I guess then m_RenderParent wouldn't be a window but I don't think my guesswork should be put into a comment. All I know is that writing it like before makes it crash.