diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index a73310396d..424a219958 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -3036,13 +3036,11 @@ void wxWindowGTK::OnInternalIdle() gdk_window_set_cursor( window, cursor.GetCursor() ); } - else + else if ( m_widget ) { - GdkWindow *window = m_widget->window; - if ((window) && !(GTK_WIDGET_NO_WINDOW(m_widget))) + if ( window && !GTK_WIDGET_NO_WINDOW(m_widget) ) gdk_window_set_cursor( window, cursor.GetCursor() ); - } } diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index 9f3a829aef..98c21e02b3 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -2932,13 +2932,11 @@ void wxWindowGTK::OnInternalIdle() gdk_window_set_cursor( window, cursor.GetCursor() ); } - else + else if ( m_widget ) { - GdkWindow *window = m_widget->window; - if ((window) && !(GTK_WIDGET_NO_WINDOW(m_widget))) + if ( window && !GTK_WIDGET_NO_WINDOW(m_widget) ) gdk_window_set_cursor( window, cursor.GetCursor() ); - } }