prevent crash when trying to set global cursor too early

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13848 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2002-01-27 00:48:16 +00:00
parent 45681cd72d
commit 9006f25eba

View File

@@ -203,11 +203,13 @@ void wxSetCursor(const wxCursor& cursor)
{ {
if ( cursor.Ok() ) if ( cursor.Ok() )
{ {
if ( g_winMng )
MGL_wmSetGlobalCursor(g_winMng, *cursor.GetMGLCursor()); MGL_wmSetGlobalCursor(g_winMng, *cursor.GetMGLCursor());
gs_globalCursor = cursor; gs_globalCursor = cursor;
} }
else else
{ {
if ( g_winMng )
MGL_wmSetGlobalCursor(g_winMng, NULL); MGL_wmSetGlobalCursor(g_winMng, NULL);
gs_globalCursor = wxNullCursor; gs_globalCursor = wxNullCursor;
} }