fix potential crash if certain Canvas methods are used before its window is realized
This commit is contained in:
parent
936861f6ce
commit
a1bc2cb10e
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user