cleaner code for 3.4 too
authorDana Jansens <danakj@orodu.net>
Thu, 31 May 2007 15:45:02 +0000 (15:45 +0000)
committerDana Jansens <danakj@orodu.net>
Thu, 31 May 2007 15:45:02 +0000 (15:45 +0000)
render/theme.c

index bbdde16f0ff77e35e5c0a3bc8200be228efad67a..c85e3d1286b0b427879c50cef1dc1471a24ed28c 100644 (file)
@@ -70,15 +70,16 @@ RrTheme* RrThemeNew(const RrInstance *inst, gchar *name,
             name = NULL;
         }
     }
-    if (name == NULL && allow_fallback) {
-        db = loaddb(DEFAULT_THEME, &path);
-        if (db == NULL) {
-            g_message("Unable to load the theme '%s'", DEFAULT_THEME);
+    if (name == NULL) {
+        if (allow_fallback) {
+            db = loaddb(DEFAULT_THEME, &path);
+            if (db == NULL) {
+                g_message("Unable to load the theme '%s'", DEFAULT_THEME);
+                return NULL;
+            }
+        } else
             return NULL;
-        }
     }
-    if (db == NULL)
-        return NULL;
 
     theme = g_new0(RrTheme, 1);