[gnome-initial-setup] gnome-initial-setup: Don't corrupt errors



commit 6ea09a6f00130bbb60b08375434a461b4baa9996
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Tue Jun 12 12:13:48 2012 -0400

    gnome-initial-setup: Don't corrupt errors

 gnome-initial-setup/gnome-initial-setup.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/gnome-initial-setup/gnome-initial-setup.c b/gnome-initial-setup/gnome-initial-setup.c
index 55572b1..5f37d9e 100644
--- a/gnome-initial-setup/gnome-initial-setup.c
+++ b/gnome-initial-setup/gnome-initial-setup.c
@@ -157,9 +157,12 @@ main (int argc, char *argv[])
         setup->builder = gtk_builder_new ();
         if (g_file_test ("setup.ui", G_FILE_TEST_EXISTS)) {
                 gtk_builder_add_from_file (setup->builder, "setup.ui", &error);
+        } else {
+                gtk_builder_add_from_resource (setup->builder, "/ui/setup.ui", &error);
         }
-        else if (!gtk_builder_add_from_resource (setup->builder, "/ui/setup.ui", &error)) {
-                g_error ("%s", error->message);
+
+        if (error != NULL) {
+                g_printerr ("%s", error->message);
                 exit (1);
         }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]