From 7676a21fc3cf8a5f543d3895f2ad94f2d356a8b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Thu, 22 Jul 2021 00:32:36 +0200 Subject: [PATCH] Some more file open logic fix/improvement --- src/map/IMG/vectortile.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/map/IMG/vectortile.cpp b/src/map/IMG/vectortile.cpp index bda064ae..b4d17a80 100644 --- a/src/map/IMG/vectortile.cpp +++ b/src/map/IMG/vectortile.cpp @@ -134,7 +134,6 @@ void VectorTile::polys(const RectC &rect, int bits, bool baseMap, rgnHdl = new SubFile::Handle(_rgn); lblHdl = new SubFile::Handle(_lbl); netHdl = new SubFile::Handle(_net); - nodHdl = new SubFile::Handle(_nod); } if (!subdiv->initialized() && !_rgn->subdivInit(*rgnHdl, subdiv)) @@ -150,6 +149,8 @@ void VectorTile::polys(const RectC &rect, int bits, bool baseMap, *lblHdl, &l); if (_net && _net->hasLinks()) { + if (!nodHdl) + nodHdl = new SubFile::Handle(_nod); if (!nodHdl2) nodHdl2 = new SubFile::Handle(_nod); _rgn->links(*rgnHdl, subdiv, shift, _net, *netHdl, _nod, *nodHdl,