From 7bc6701788633468edecfeb14add5c68a5f3b006 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Thu, 31 May 2007 15:45:02 +0000 Subject: [PATCH] cleaner code for 3.4 too --- render/theme.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) 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); -- 2.34.1