[gimp] Don't try to set stuff on a NULL image
- From: Michael Natterer <mitch src gnome org>
- To: svn-commits-list gnome org
- Subject: [gimp] Don't try to set stuff on a NULL image
- Date: Sun, 24 May 2009 11:55:50 -0400 (EDT)
commit 57066577f82cd88658854aa500e16dcba3062030
Author: Michael Natterer <mitch gimp org>
Date: Sun May 24 17:54:25 2009 +0200
Don't try to set stuff on a NULL image
file_open(): don't set import/export stuff on the image is if
didn't actually got loaded.
---
app/file/file-open.c | 22 +++++++++++-----------
1 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/app/file/file-open.c b/app/file/file-open.c
index 78d1f9d..63cdcf1 100644
--- a/app/file/file-open.c
+++ b/app/file/file-open.c
@@ -202,20 +202,20 @@ file_open_image (Gimp *gimp,
if (image)
{
file_open_handle_color_profile (image, context, progress, run_mode);
- }
- if (file_open_file_proc_is_import (file_proc))
- {
- /* Remember the import source */
- g_object_set_data_full (G_OBJECT (image), GIMP_FILE_IMPORT_SOURCE_URI_KEY,
- g_strdup (uri), (GDestroyNotify) g_free);
+ if (file_open_file_proc_is_import (file_proc))
+ {
+ /* Remember the import source */
+ g_object_set_data_full (G_OBJECT (image), GIMP_FILE_IMPORT_SOURCE_URI_KEY,
+ g_strdup (uri), (GDestroyNotify) g_free);
- /* Set 'Export to' target to import source */
- g_object_set_data_full (G_OBJECT (image), GIMP_FILE_EXPORT_TO_URI_KEY,
- g_strdup (uri), (GDestroyNotify) g_free);
+ /* Set 'Export to' target to import source */
+ g_object_set_data_full (G_OBJECT (image), GIMP_FILE_EXPORT_TO_URI_KEY,
+ g_strdup (uri), (GDestroyNotify) g_free);
- /* We shall treat this file as an Untitled file */
- gimp_object_set_name (GIMP_OBJECT (image), NULL);
+ /* We shall treat this file as an Untitled file */
+ gimp_object_set_name (GIMP_OBJECT (image), NULL);
+ }
}
return image;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]