From 6fe628c5580ebffc53d27eacfc5ae2c7159a58bc Mon Sep 17 00:00:00 2001 From: Stefano Karapetsas Date: Sat, 9 Feb 2013 00:34:17 +0100 Subject: Fix segmentation fault on resolution change --- plugins/background/msd-background-manager.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/background/msd-background-manager.c b/plugins/background/msd-background-manager.c index e1a366f..a2164b4 100644 --- a/plugins/background/msd-background-manager.c +++ b/plugins/background/msd-background-manager.c @@ -263,6 +263,11 @@ static void on_screen_size_changed (GdkScreen *screen, MsdBackgroundManager *manager) { + MsdBackgroundManagerPrivate *p = manager->priv; + + if (!p->msd_can_draw || p->draw_in_progress || caja_is_drawing_bg (manager)) + return; + gint scr_num = gdk_screen_get_number (screen); gchar *old_size = g_list_nth (manager->priv->scr_sizes, scr_num)->data; gchar *new_size = g_strdup_printf ("%dx%d", gdk_screen_get_width (screen), -- cgit v1.2.1