]> Pileus Git - ~andy/gtk/commitdiff
Bug 558397 – gtk_widget_error_bell undefined without a screen
authorChristian Dywan <cdywan@src.gnome.org>
Wed, 29 Oct 2008 15:08:49 +0000 (15:08 +0000)
committerChristian Dywan <cdywan@src.gnome.org>
Wed, 29 Oct 2008 15:08:49 +0000 (15:08 +0000)
* gtk/gtkwidget.c (gtk_widget_error_bell): Test the settings
instance and return silently if unset

svn path=/trunk/; revision=21725

ChangeLog
gtk/gtkwidget.c

index ca8d2b9c6986511bb337581428745e39d9717ee2..9da24dd9a908de2a8302e715cf59654b2e4312a3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-10-29  Christian Dywan  <christian@imendio.com>
+
+       Bug 558397 – gtk_widget_error_bell undefined without a screen
+
+       * gtk/gtkwidget.c (gtk_widget_error_bell): Test the settings
+       instance and return silently if unset
+
 2008-10-28  Michael Natterer  <mitch@imendio.com>
 
        * gdk/keyname-table.h: fix small typo.
index df3e73ec2f0072704660a72414d0f7cf9b0fa9ec..d6dcc12c3e27851a911c9ca134830ba8a7243ca3 100644 (file)
@@ -6943,11 +6943,16 @@ gtk_widget_keynav_failed (GtkWidget        *widget,
 void
 gtk_widget_error_bell (GtkWidget *widget)
 {
+  GtkSettings* settings;
   gboolean beep;
 
   g_return_if_fail (GTK_IS_WIDGET (widget));
 
-  g_object_get (gtk_widget_get_settings (widget),
+  settings = gtk_widget_get_settings (widget);
+  if (!settings)
+    return;
+
+  g_object_get (settings,
                 "gtk-error-bell", &beep,
                 NULL);