diff --git a/src/sdl/sdlvideo.cpp b/src/sdl/sdlvideo.cpp index c479351ab..441ef0d20 100644 --- a/src/sdl/sdlvideo.cpp +++ b/src/sdl/sdlvideo.cpp @@ -222,6 +222,8 @@ DFrameBuffer *SDLVideo::CreateFrameBuffer (int width, int height, bool fullscree return old; } old->GetFlash (flashColor, flashAmount); + old->ObjectFlags |= OF_YesReallyDelete; + if (screen == old) screen = NULL; delete old; } else diff --git a/src/win32/win32video.cpp b/src/win32/win32video.cpp index 800f512f0..dbdc8990b 100644 --- a/src/win32/win32video.cpp +++ b/src/win32/win32video.cpp @@ -505,6 +505,7 @@ DFrameBuffer *Win32Video::CreateFrameBuffer (int width, int height, bool fullscr } old->GetFlash (flashColor, flashAmount); old->ObjectFlags |= OF_YesReallyDelete; + if (old == screen) screen = NULL; delete old; } else