Permalink
Browse files

Contour layer: report error when DATA isn't defined (#5212)

  • Loading branch information...
rouault committed Dec 15, 2015
1 parent 157fa47 commit f8ec673eb57e7838808206ef38e2f70d28985b9f
Showing with 7 additions and 1 deletion.
  1. +7 −1 mapcontour.c
View
@@ -632,7 +632,13 @@ int msContourLayerOpen(layerObj *layer)
msContourLayerInfoInitialize(layer);
clinfo = (contourLayerInfo *) layer->layerinfo;
-
+ if (layer->data == NULL ) {
+ msSetError(MS_MISCERR,
+ "Layer %s has no DATA defined.",
+ "msContourLayerOpen()",
+ layer->name);
+ return MS_FAILURE;
+ }
GDALAllRegister();
/* Open the original Dataset */

0 comments on commit f8ec673

Please sign in to comment.