]> git.street.me.uk Git - andy/viking.git/blobdiff - src/viktrwlayer_geotag.c
[Geotagging] Fix SF#3564795: Crashing when attempting to create waypoints from EXIF...
[andy/viking.git] / src / viktrwlayer_geotag.c
index 60718fce008c2209fff2529e79687bc7e72e7294..5be6178c7fddc60424501a2344ac3ec096f0e07b 100644 (file)
@@ -256,6 +256,11 @@ static void trw_layer_geotag_process ( geotag_options_t *options )
                                // Create waypoint with file information
                                gchar *name = NULL;
                                VikWaypoint *wp = a_geotag_create_waypoint_from_file ( options->image, vik_trw_layer_get_coord_mode (options->vtl), &name );
+                               if ( !wp ) {
+                                       // Couldn't create Waypoint
+                                       g_free ( datetime );
+                                       return;
+                               }
                                if ( !name )
                                        name = g_strdup ( a_file_basename ( options->image ) );