diff options
author | Alberts Muktupāvels <alberts.muktupavels@gmail.com> | 2016-01-12 23:03:24 +0200 |
---|---|---|
committer | Alberts Muktupāvels <alberts.muktupavels@gmail.com> | 2016-01-12 23:03:24 +0200 |
commit | ef6230c4bb097c0f77a7bfc2bf0b42fbfbcad203 (patch) | |
tree | 4af57b73c57044eb0c2192722df4545b02a7a855 | |
parent | f405d10e9759b2c5df7f496a12c824732adeeb33 (diff) | |
download | metacity-ef6230c4bb097c0f77a7bfc2bf0b42fbfbcad203.tar.gz |
theme-viewer: fix segfault
https://bugzilla.gnome.org/show_bug.cgi?id=758674
-rw-r--r-- | src/ui/theme-viewer.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/ui/theme-viewer.c b/src/ui/theme-viewer.c index caca5be4..f85b487d 100644 --- a/src/ui/theme-viewer.c +++ b/src/ui/theme-viewer.c @@ -851,7 +851,6 @@ main (int argc, char **argv) GtkWidget *collection; MetaStyleInfo *style_info; PangoFontDescription *font_desc; - GError *err; clock_t start, end; GtkWidget *notebook; int i; @@ -874,11 +873,10 @@ main (int argc, char **argv) } start = clock (); - err = NULL; if (argc == 1) - global_theme = meta_theme_load ("Atlanta", &err); + meta_theme_set_current ("Atlanta", FALSE); else if (argc == 2) - global_theme = meta_theme_load (argv[1], &err); + meta_theme_set_current (argv[1], FALSE); else { g_printerr (_("Usage: metacity-theme-viewer [THEMENAME]\n")); @@ -886,13 +884,9 @@ main (int argc, char **argv) } end = clock (); + global_theme = meta_theme_get_current (); if (global_theme == NULL) - { - g_printerr (_("Error loading theme: %s\n"), - err->message); - g_error_free (err); - exit (1); - } + exit (1); g_print (_("Loaded theme \"%s\" in %g seconds\n"), global_theme->name, |