background: Avoid accessing the panel if cancelled
If the background panel was closed, we shouldn't try to access panel's internals as it's already been freed. https://bugzilla.redhat.com/show_bug.cgi?id=880859
This commit is contained in:
parent
681aed6f9c
commit
f959d3072b
1 changed files with 3 additions and 1 deletions
|
@ -243,7 +243,7 @@ on_screenshot_finished (GObject *source,
|
|||
{
|
||||
ScreenshotData *data = user_data;
|
||||
CcBackgroundPanel *panel = data->panel;
|
||||
CcBackgroundPanelPrivate *priv = panel->priv;
|
||||
CcBackgroundPanelPrivate *priv;
|
||||
GError *error;
|
||||
GdkPixbuf *pixbuf;
|
||||
cairo_surface_t *surface;
|
||||
|
@ -270,6 +270,8 @@ on_screenshot_finished (GObject *source,
|
|||
}
|
||||
g_variant_unref (result);
|
||||
|
||||
priv = panel->priv;
|
||||
|
||||
pixbuf = gdk_pixbuf_new_from_file (panel->priv->screenshot_path, &error);
|
||||
if (pixbuf == NULL)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue