Skip to content
Permalink
Browse files

Add check for NULL msGMLGetItems

  • Loading branch information...
geographika committed Mar 23, 2019
1 parent 8f6dd81 commit f6d40c8408bf61c5e9a19837a66737334e2ab725
Showing with 5 additions and 3 deletions.
  1. +5 −3 mapscript/swiginc/layer.i
@@ -703,9 +703,11 @@ available, and the first item is index zero."
if (i >= 0 && i < self->numitems) {
gmlItemListObj *item_list;
item_list = msGMLGetItems(self, "G");
gmlItemObj *item = item_list->items + i;
itemType = msStrdup(item->type);
msGMLFreeItems(item_list); // destroy the original list
if (item_list != NULL) {
gmlItemObj *item = item_list->items + i;
itemType = msStrdup(item->type);
msGMLFreeItems(item_list); // destroy the original list
}
}

return itemType;

0 comments on commit f6d40c8

Please sign in to comment.
You can’t perform that action at this time.