summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOndrej Holy <oholy@redhat.com>2021-02-13 16:24:23 +0100
committerOndrej Holy <oholy@redhat.com>2021-02-13 16:46:48 +0100
commit50fc39c51ca411d101a1052f396eeb78e0bdf500 (patch)
tree37cae3d85512edf56a3d67c56b5d213caaea8c14
parent9012c36da881818f52e223ce73ad4bb17db3d370 (diff)
downloadnautilus-50fc39c51ca411d101a1052f396eeb78e0bdf500.tar.gz
preferences-window: Print error from gtk_builder_add_from_resource
Currently, gtk_builder_add_from_resource silently fails with old libhandy version which leads to weird crashes. Let's print the returned error to be obvious what is going on.
-rw-r--r--src/nautilus-preferences-window.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/nautilus-preferences-window.c b/src/nautilus-preferences-window.c
index 55db3276a..996ba559a 100644
--- a/src/nautilus-preferences-window.c
+++ b/src/nautilus-preferences-window.c
@@ -390,6 +390,7 @@ static void nautilus_preferences_window_setup(GtkBuilder *builder,
void nautilus_preferences_window_show(GtkWindow *window)
{
GtkBuilder *builder;
+ g_autoptr (GError) error = NULL;
if (preferences_window != NULL)
{
@@ -400,7 +401,11 @@ void nautilus_preferences_window_show(GtkWindow *window)
builder = gtk_builder_new ();
gtk_builder_add_from_resource (
- builder, "/org/gnome/nautilus/ui/nautilus-preferences-window.ui", NULL);
+ builder, "/org/gnome/nautilus/ui/nautilus-preferences-window.ui", &error);
+ if (error != NULL)
+ {
+ g_error ("Failed to add nautilus-preferences-window.ui: %s", error->message);
+ }
nautilus_preferences_window_setup (builder, window);