Fix #605: Crash when writing metadata to .svg files
authorColin Clark <colin.clark@cclark.uk>
Wed, 2 May 2018 18:02:13 +0000 (19:02 +0100)
committerColin Clark <colin.clark@cclark.uk>
Wed, 2 May 2018 18:02:13 +0000 (19:02 +0100)
https://github.com/BestImageViewer/geeqie/issues/605

This corrects a coding error, which caused the crash.

Parhaps the defaults in filefilter.c at about line 238 should be changed
to set these files to no-write:
pnm, svg, gif, xbm, xpm, bmp, ico, ras

But line 228 sets them to writable anyway.

src/exiv2.cc

index 0ad5c61..b3c8065 100644 (file)
@@ -374,7 +374,7 @@ public:
 #endif
                        Exiv2::Image *image = imageData_->image();
 
-                       if (!image) Exiv2::Error(21);
+                       if (!image) throw Exiv2::Error(21);
                        image->setExifData(exifData_);
                        image->setIptcData(iptcData_);
 #if EXIV2_TEST_VERSION(0,16,0)