From b3d006af0fca9ba3679f092016cf149c9f6fd06c Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 16 Jul 2006 18:44:51 +0000 Subject: [PATCH] don't crash if m_widget == NULL in OnInternalIdle() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40131 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/window.cpp | 6 ++---- src/gtk1/window.cpp | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) 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() ); - } }