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;
|
ScreenshotData *data = user_data;
|
||||||
CcBackgroundPanel *panel = data->panel;
|
CcBackgroundPanel *panel = data->panel;
|
||||||
CcBackgroundPanelPrivate *priv = panel->priv;
|
CcBackgroundPanelPrivate *priv;
|
||||||
GError *error;
|
GError *error;
|
||||||
GdkPixbuf *pixbuf;
|
GdkPixbuf *pixbuf;
|
||||||
cairo_surface_t *surface;
|
cairo_surface_t *surface;
|
||||||
|
@ -270,6 +270,8 @@ on_screenshot_finished (GObject *source,
|
||||||
}
|
}
|
||||||
g_variant_unref (result);
|
g_variant_unref (result);
|
||||||
|
|
||||||
|
priv = panel->priv;
|
||||||
|
|
||||||
pixbuf = gdk_pixbuf_new_from_file (panel->priv->screenshot_path, &error);
|
pixbuf = gdk_pixbuf_new_from_file (panel->priv->screenshot_path, &error);
|
||||||
if (pixbuf == NULL)
|
if (pixbuf == NULL)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue