aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc/e-image-chooser.c
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/misc/e-image-chooser.c')
-rw-r--r--widgets/misc/e-image-chooser.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/widgets/misc/e-image-chooser.c b/widgets/misc/e-image-chooser.c
index 2f451543e3..32a3f2a899 100644
--- a/widgets/misc/e-image-chooser.c
+++ b/widgets/misc/e-image-chooser.c
@@ -255,7 +255,8 @@ image_drag_data_received_cb (GtkWidget *widget,
if (e_util_read_file (uris[0], TRUE, &buf, &read, &error) && read > 0 && buf)
handled = set_image_from_data (chooser, buf, read);
- g_free (buf);
+ if (!handled)
+ g_free (buf);
g_strfreev (uris);