From 298e465e221e303d9a959f02b32ff069246ce9bb Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 30 Mar 2008 09:30:34 +0000 Subject: [PATCH] - NULLed screen in CreateFrameBuffer if it's the same as 'old' and gets deleted. SVN r871 (trunk) --- src/sdl/sdlvideo.cpp | 2 ++ src/win32/win32video.cpp | 1 + 2 files changed, 3 insertions(+) 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