monitor-config-store: Don't clear cancellable when cancelled
The cancellable should only be cleared if we weren't cancelled, as if we were cancelled, the path cancelling have already cleared the cancellable. https://bugzilla.gnome.org/show_bug.cgi?id=787477
This commit is contained in:
parent
96572fbe6a
commit
5ed954e6de
@ -1230,9 +1230,10 @@ saved_cb (GObject *object,
|
|||||||
if (!g_file_replace_contents_finish (G_FILE (object), result, NULL, &error))
|
if (!g_file_replace_contents_finish (G_FILE (object), result, NULL, &error))
|
||||||
{
|
{
|
||||||
if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
|
if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
|
||||||
g_warning ("Saving monitor configuration failed: %s\n", error->message);
|
{
|
||||||
else
|
g_warning ("Saving monitor configuration failed: %s\n", error->message);
|
||||||
g_clear_object (&data->config_store->save_cancellable);
|
g_clear_object (&data->config_store->save_cancellable);
|
||||||
|
}
|
||||||
|
|
||||||
g_error_free (error);
|
g_error_free (error);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user