summaryrefslogtreecommitdiff
path: root/gtk/gtksettings.c
diff options
context:
space:
mode:
authorPhilip Withnall <withnall@endlessm.com>2017-02-09 17:17:05 +0000
committerPhilip Withnall <withnall@endlessm.com>2017-09-12 16:04:44 +0100
commit80b10aa1bd8b49a24940088f1949abbd213196d4 (patch)
treead4a427a893d56dcbac02d04ab48aa6ae71fa0c1 /gtk/gtksettings.c
parent69102ac8df7945de700b6fc8210b921fa9204866 (diff)
downloadgtk+-80b10aa1bd8b49a24940088f1949abbd213196d4.tar.gz
gtksettings: Add a debug message if there is no default GtkSettings
Make it slightly more obvious when things are about to slide sideways because a NULL GtkSettings has been returned to a caller. This is a valid return value, but is rarely handled correctly. https://bugzilla.gnome.org/show_bug.cgi?id=778382
Diffstat (limited to 'gtk/gtksettings.c')
-rw-r--r--gtk/gtksettings.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gtk/gtksettings.c b/gtk/gtksettings.c
index ee0a081993..3bdb863eaf 100644
--- a/gtk/gtksettings.c
+++ b/gtk/gtksettings.c
@@ -1281,8 +1281,10 @@ gtk_settings_get_default (void)
if (display)
return gtk_settings_get_for_display (display);
- else
- return NULL;
+
+ g_debug ("%s() returning NULL GtkSettings object. Is a display available?",
+ G_STRFUNC);
+ return NULL;
}
static void