]> git.street.me.uk Git - andy/viking.git/blobdiff - src/file.c
SF#356778: Download Map Tiles using F5
[andy/viking.git] / src / file.c
index 1e9bf629be3d9a59e74e67f256e9f02c0daa8019..f185a4671b387593bc91765ec82abd32d6f0f91a 100644 (file)
@@ -392,9 +392,11 @@ static gboolean file_read ( VikAggregateLayer *top, FILE *f, VikViewport *vp )
       else if ( str_starts_with ( line, "LayerData", 9, FALSE ) )
       {
         if ( stack->data && vik_layer_get_interface(VIK_LAYER(stack->data)->type)->read_file_data )
-          vik_layer_get_interface(VIK_LAYER(stack->data)->type)->read_file_data ( VIK_LAYER(stack->data), f );
+        {
           /* must read until hits ~EndLayerData */
-
+          if ( ! vik_layer_get_interface(VIK_LAYER(stack->data)->type)->read_file_data ( VIK_LAYER(stack->data), f ) )
+            successful_read = FALSE;
+        }
         else
         { /* simply skip layer data over */
           while ( fgets ( buffer, 4096, f ) )