Skip to content
This repository
Browse code

Merge pull request #3 from matze/fix-issue-2

Fix issue #2, empty filename crashes exif reading
  • Loading branch information...
commit 146337d5c9c03b54d0e1c00cf7770a704081200c 2 parents 7ab4827 + d1091f4
seebk authored June 05, 2012
2  Makefile
@@ -2,7 +2,7 @@ CFLAGS = -O3 -Wall $(shell gimptool-2.0 --cflags && pkg-config --cflags lensfun
2 2
 LIBS = $(shell gimptool-2.0 --libs && pkg-config --libs lensfun exiv2)
3 3
 PLUGIN = gimplensfun
4 4
 SOURCES = src/gimplensfun.c
5  
-CC = /usr/bin/g++-4.4
  5
+CC = g++
6 6
 # LD = gcc-4.4
7 7
 # END CONFIG ##################################################################
8 8
 
7  src/gimplensfun.c
@@ -1075,9 +1075,10 @@ run (const gchar*   name,
1075 1075
         ldb->Load ();
1076 1076
 
1077 1077
         // read exif data
1078  
-        if (read_opts_from_exif(gimp_image_get_filename(imageID))!=0) {
1079  
-            printf("No Exif data found");
1080  
-        }
  1078
+        const gchar *filename = gimp_image_get_filename(imageID);
  1079
+
  1080
+        if ((filename != NULL) && (read_opts_from_exif(filename) != 0))
  1081
+            g_print("No Exif data found");
1081 1082
 
1082 1083
         /* Display the dialog */
1083 1084
         if (! create_dialog_window (drawable))

0 notes on commit 146337d

Please sign in to comment.
Something went wrong with that request. Please try again.