13
0

fix potential crash if certain Canvas methods are used before its window is realized

This commit is contained in:
Paul Davis 2014-07-07 08:00:20 -04:00
parent 936861f6ce
commit a1bc2cb10e

View File

@ -454,9 +454,15 @@ GtkCanvas::deliver_enter_leave (Duple const & point, int state)
{
/* setup enter & leave event structures */
Glib::RefPtr<Gdk::Window> win = get_window();
if (!win) {
return;
}
GdkEventCrossing enter_event;
enter_event.type = GDK_ENTER_NOTIFY;
enter_event.window = get_window()->gobj();
enter_event.window = win->gobj();
enter_event.send_event = 0;
enter_event.subwindow = 0;
enter_event.mode = GDK_CROSSING_NORMAL;