X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f97c985452b20a8c2f0bbfb1d0275298bf09fb45..7b9da2077d0975db6c965a85c91d5aca671ab5e3:/src/motif/cursor.cpp?ds=sidebyside diff --git a/src/motif/cursor.cpp b/src/motif/cursor.cpp index 24c94be559..c1027a775e 100644 --- a/src/motif/cursor.cpp +++ b/src/motif/cursor.cpp @@ -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; @@ -423,7 +428,7 @@ WXCursor wxCursor::MakeCursor(WXDisplay* display, wxStockCursor id) } // Global cursor setting -void wxSetCursor(const wxCursor& cursor) +void wxSetCursor(const wxCursor& WXUNUSED(cursor)) { // Nothing to do for Motif (no global cursor) }