X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/99ee04b97b773ddbd7dbb8f2be3638c946eda208..5ed738a766bb06539893bd424759e75926c43e15:/src/mgl/cursor.cpp?ds=sidebyside diff --git a/src/mgl/cursor.cpp b/src/mgl/cursor.cpp index 94df70a5c2..0abbaccedb 100644 --- a/src/mgl/cursor.cpp +++ b/src/mgl/cursor.cpp @@ -69,6 +69,9 @@ wxCursor::wxCursor() wxCursor::wxCursor(int cursorId) { + if ( !gs_cursorsHash ) + gs_cursorsHash = new wxCursorsHash; + if ( gs_cursorsHash->find(cursorId) != gs_cursorsHash->end() ) { wxLogTrace(_T("mglcursor"), _T("cursor id %i fetched from cache"), cursorId); @@ -286,11 +289,7 @@ bool wxIsBusy() class wxCursorModule : public wxModule { public: - virtual bool OnInit() - { - gs_cursorsHash = new wxCursorsHash; - return TRUE; - } + virtual bool OnInit() { return TRUE; } virtual void OnExit() {