From f58c95d532e67e07a0042d728e8cac1b49f290f0 Mon Sep 17 00:00:00 2001 From: glx Date: Tue, 17 Mar 2009 16:28:21 +0000 Subject: (svn r15752) -Fix: don't try to (un)draw the cursor when the screen is not ready --- src/gfx.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gfx.cpp b/src/gfx.cpp index 4423bff19..aeac0db1d 100644 --- a/src/gfx.cpp +++ b/src/gfx.cpp @@ -1285,6 +1285,9 @@ void ScreenSizeChanged() void UndrawMouseCursor() { + /* Don't undraw the mouse cursor if the screen is not ready */ + if (_screen.dst_ptr == NULL) return; + if (_cursor.visible) { Blitter *blitter = BlitterFactoryBase::GetCurrentBlitter(); _cursor.visible = false; @@ -1300,6 +1303,9 @@ void DrawMouseCursor() return; #endif + /* Don't draw the mouse cursor if the screen is not ready */ + if (_screen.dst_ptr == NULL) return; + Blitter *blitter = BlitterFactoryBase::GetCurrentBlitter(); int x; int y; -- cgit v1.2.3-54-g00ecf