fixed failed assertion in exif_free
authorVladimir Nadvornik <nadvornik@suse.cz>
Mon, 20 Oct 2008 17:13:32 +0000 (17:13 +0000)
committerVladimir Nadvornik <nadvornik@suse.cz>
Mon, 20 Oct 2008 17:13:32 +0000 (17:13 +0000)
src/exiv2.cc

index 07b5afa..45bcf52 100644 (file)
@@ -352,6 +352,7 @@ int exif_write(ExifData *exif)
 
 void exif_free(ExifData *exif)
 {
+       if (!exif) return;
        g_assert(dynamic_cast<_ExifDataProcessed *>(exif)); // this should not be called on ExifDataOriginal
        delete exif;
 }