From fac0bae006c59fc12ffcb4ebab266e03e9897463 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Sat, 8 Feb 2020 16:01:22 +0100 Subject: [PATCH] Fixed crash on GMP tiles without LBL or NET parts --- src/map/IMG/vectortile.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/map/IMG/vectortile.cpp b/src/map/IMG/vectortile.cpp index e10a2792..56945f5f 100644 --- a/src/map/IMG/vectortile.cpp +++ b/src/map/IMG/vectortile.cpp @@ -80,10 +80,10 @@ bool VectorTile::initGMP() && _gmp->readUInt32(hdl, net))) return false; - _tre = new TREFile(_gmp, tre); - _rgn = new RGNFile(_gmp, rgn); - _lbl = new LBLFile(_gmp, lbl); - _net = new NETFile(_gmp, net); + _tre = tre ? new TREFile(_gmp, tre) : 0; + _rgn = rgn ? new RGNFile(_gmp, rgn) : 0; + _lbl = lbl ? new LBLFile(_gmp, lbl) : 0; + _net = net ? new NETFile(_gmp, net) : 0; return true; }