From: Dana Jansens Date: Thu, 31 May 2007 15:45:02 +0000 (+0000) Subject: cleaner code for 3.4 too X-Git-Tag: openbox-3_3_995-RELEASE~25 X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=7bc6701788633468edecfeb14add5c68a5f3b006;p=dana%2Fopenbox.git cleaner code for 3.4 too --- diff --git a/render/theme.c b/render/theme.c index bbdde16f..c85e3d12 100644 --- a/render/theme.c +++ b/render/theme.c @@ -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);