gimp r27346 - in trunk: . app/actions



Author: neo
Date: Tue Oct 21 07:51:08 2008
New Revision: 27346
URL: http://svn.gnome.org/viewvc/gimp?rev=27346&view=rev

Log:
2008-10-21  Sven Neumann  <sven gimp org>

	* app/actions/file-commands.c (file_open_recent_cmd_callback): 
ref
	the GimpDisplay and GimpImageFile objects while holding a
	reference to them. Fixes a potential crash if GIMP is closed 
while
	the image is being loaded.



Modified:
   trunk/ChangeLog
   trunk/app/actions/file-commands.c

Modified: trunk/app/actions/file-commands.c
==============================================================================
--- trunk/app/actions/file-commands.c	(original)
+++ trunk/app/actions/file-commands.c	Tue Oct 21 07:51:08 2008
@@ -166,6 +166,9 @@
       GError            *error = NULL;
       return_if_no_display (display, data);
 
+      g_object_ref (display);
+      g_object_ref (imagefile);
+
       progress = display->image ? NULL : GIMP_PROGRESS (display);
 
       image = file_open_with_display (gimp, action_data_get_context (data),
@@ -185,6 +188,9 @@
 
           g_free (filename);
         }
+
+      g_object_unref (imagefile);
+      g_object_unref (display);
     }
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]