]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/cursor.cpp
More Motif additions: mdi and sashtest samples now just about work!
[wxWidgets.git] / src / motif / cursor.cpp
index 24c94be559871dd43c2d9bc53262307d50e05ffd..829a616a5b24fb1c5d78e7c8a837b8ead0caf057 100644 (file)
@@ -188,8 +188,13 @@ wxCursor::wxCursor(wxStockCursor id)
 {
     m_refData = new wxCursorRefData;
     M_CURSORDATA->m_cursorId = id;
+    M_CURSORDATA->m_ok = TRUE;
 
-    WXCursor cursor = GetXCursor(wxGetDisplay());
+    WXDisplay* display = wxGetDisplay();
+    if (!display)
+      return;
+
+    WXCursor cursor = GetXCursor(display);
     if (cursor)
     {
         wxXCursor* c = new wxXCursor;