From 81f695a6723e82708408ea130f10a5fb9e13ff90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Mon, 3 Apr 2023 23:29:35 +0200 Subject: [PATCH] Fixed crash on empty IMG/GMAP maps --- src/map/IMG/mapdata.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/map/IMG/mapdata.cpp b/src/map/IMG/mapdata.cpp index 6eee71cc..16c55934 100644 --- a/src/map/IMG/mapdata.cpp +++ b/src/map/IMG/mapdata.cpp @@ -109,6 +109,9 @@ void MapData::computeZooms() zooms.insert(z.at(i)); } + if (zooms.isEmpty()) + return; + _zooms = zooms.values(); std::sort(_zooms.begin(), _zooms.end());