diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2019-05-07 09:59:10 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2019-05-07 10:04:01 +0300 |
commit | 02d4fbe29e4278c202beaca93d64f1867ca79ac2 (patch) | |
tree | a270dfaebbd1a2decdc555ea9660cc427e64dfd4 | |
parent | 8af587c189e3d9b73be5751e2d07bd76626c4e0f (diff) | |
download | gtk+-02d4fbe29e4278c202beaca93d64f1867ca79ac2.tar.gz |
GdkWindow - Don't call unimplemented NULL set_startup_id() vfunc on Win32
GdkWindow::set_startup_id() is NULL on Win32 and would cause a segfault
if called.
While the documentation of the main caller of set_startup_id(),
gtk_window_set_startup_id(), mentions that it's not implemented on
Windows it can still be automatically called via Glade and simply doing
nothing on Win32 is going to be less disruptive than a segfault.
-rw-r--r-- | gdk/gdkwindow.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c index 14164092d0..6601a32c9c 100644 --- a/gdk/gdkwindow.c +++ b/gdk/gdkwindow.c @@ -10500,7 +10500,10 @@ void gdk_window_set_startup_id (GdkWindow *window, const gchar *startup_id) { - GDK_WINDOW_IMPL_GET_CLASS (window->impl)->set_startup_id (window, startup_id); + GdkWindowImplClass *klass = GDK_WINDOW_IMPL_GET_CLASS (window->impl); + + if (klass->set_startup_id) + klass->set_startup_id (window, startup_id); } /** |