winport - fix crash on startup with clean ini file

This commit is contained in:
zeromus 2015-12-11 01:22:00 +00:00
parent bc84d6930b
commit 69ee626639
1 changed files with 3 additions and 2 deletions

View File

@ -4957,6 +4957,8 @@ DOKEYDOWN:
if(!romloaded)
{
//ugh, dont do this when creating the window. in case we're using ddraw display method, ddraw wont be setup yet
if(ddraw.handle)
Display();
}
else
@ -7254,7 +7256,6 @@ bool DDRAW::createSurfaces(HWND hwnd)
if (!handle) return true;
if (clip) { clip->Release(); clip = NULL; }
if (surface.back) { surface.back->Release(); surface.back = NULL; }
if (surface.primary) { surface.primary->Release(); surface.primary = NULL; }