[gthumb] Fixed a crash when a task returns an error
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] Fixed a crash when a task returns an error
- Date: Sun, 20 Feb 2011 13:37:38 +0000 (UTC)
commit 99a043686a88717cb4c56dacbc80ef6d21181574
Author: Paolo Bacchilega <paobac src gnome org>
Date: Sun Feb 20 13:34:33 2011 +0100
Fixed a crash when a task returns an error
Copy the error object before using it.
gthumb/gth-browser.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gthumb/gth-browser.c b/gthumb/gth-browser.c
index cd3ba6c..d15ac9b 100644
--- a/gthumb/gth-browser.c
+++ b/gthumb/gth-browser.c
@@ -4705,10 +4705,10 @@ background_task_completed_cb (GthTask *task,
if (error == NULL)
return;
- if (! g_error_matches (error, GTH_TASK_ERROR, GTH_TASK_ERROR_CANCELLED) && ! g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
- _gtk_error_dialog_from_gerror_show (GTK_WINDOW (browser), _("Could not perform the operation"), &error);
- else
- g_error_free (error);
+ if (! g_error_matches (error, GTH_TASK_ERROR, GTH_TASK_ERROR_CANCELLED) && ! g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
+ GError *local_error = g_error_copy (error);
+ _gtk_error_dialog_from_gerror_show (GTK_WINDOW (browser), _("Could not perform the operation"), &local_error);
+ }
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]