Hey everyone, I have a problem (yes, I always do ). This is my code:
Code:
void gameShutdown()
{
ShowCursor(TRUE);
gfx.shutdown();
DestroyWindow(hWnd); // <--- Crashes!
}
void GFX::shutdown()
{
SAFE_RELEASE(sfcBack);
SAFE_RELEASE(sfcFront);
SAFE_RELEASE(lpdd);
}
If I take out the DestroyWindow(), it will quit normally. If I leave it in, it will give me an illegal operation ("invalid page fault"). DestroyWindow() is not called anywhere else in the program; and also, the same code minus the ShowCursor() worked fine in another project. Does anybody have an idea of what's wrong?
P.S. I've attached a screenshot of what it shows when I hit debug...