GNOME Bugzilla – Bug 566377
Opening by right-clicking on the thumbnail crashes gthumb
Last modified: 2009-01-05 16:17:50 UTC
Launch gthumb trunk (rev 2486), right-click on a thumbnail, select "Open", and Gthumb will crash. This is due to an uninitialized variable 'file' in image_viewer.c:load_image__step2 (line 1228). Christophe
Created attachment 125671 [details] [review] Fix a crash when right-clicking on a thumbnail and selecting "Open" Hello Mike, Since I never worked on the image loading code, could you please review this quick fix carefully? Thanks! Christophe
Ughh, that bug was introduced here: http://svn.gnome.org/viewvc/gthumb/trunk/libgthumb/image-viewer.c?r1=1954&r2=2367#l1543 as part of the image-viewer refactoring in bug 501512. Committed! Thanks! - Mike
Whoops, why are we making a new FileData when one already exists? The reference to "file" should simply have been changed to "lidata->file". Simplified version of the patch: http://svn.gnome.org/viewvc/gthumb/trunk/libgthumb/image-viewer.c?r1=2489&r2=2487&pathrev=2489 - Mike
Oops. Actually I spotted the orphaned declaration: FileData *file; in the refactoring patch you mentioned above. I (incorrectly) took it as a hint that it was necessary to make a copy of the FileData member. I did not went further. So it was a quick and lazy fix! Thanks for correcting me. --Christophe