# HG changeset patch # User Wuzzy # Date 1521639386 -3600 # Node ID e13777374583572a00c159d7a4e84d8bc132bff0 # Parent 66dd7b5f7d33b45b1eb0ebece74e97b9edd122c5 Add some isNull checks for some strings in mapContainer diff -r 66dd7b5f7d33 -r e13777374583 QTfrontend/ui/widget/mapContainer.cpp --- a/QTfrontend/ui/widget/mapContainer.cpp Tue Mar 20 02:24:47 2018 +0100 +++ b/QTfrontend/ui/widget/mapContainer.cpp Wed Mar 21 14:36:26 2018 +0100 @@ -858,7 +858,7 @@ { // restore theme selection // do this before map selection restore, because map may overwrite theme - if (!m_theme.isEmpty()) + if (!m_theme.isNull() && !m_theme.isEmpty()) { QModelIndexList mdl = m_themeModel->match(m_themeModel->index(0), Qt::DisplayRole, m_theme); if (mdl.size() > 0) @@ -868,7 +868,7 @@ } // restore map selection - if (!m_curMap.isEmpty()) + if (!m_curMap.isNull() && !m_curMap.isEmpty()) intSetMap(m_curMap); else updatePreview(); @@ -1162,9 +1162,9 @@ m_curMap = m_mapInfo.name; // the map has no pre-defined theme, so let's use the selected one - if (m_mapInfo.theme.isEmpty()) + if (m_mapInfo.theme.isNull() || m_mapInfo.theme.isEmpty()) { - if (!selectedTheme.isEmpty()) + if (!selectedTheme.isNull() && !selectedTheme.isEmpty()) { setTheme(selectedTheme); emit themeChanged(selectedTheme); @@ -1261,7 +1261,7 @@ void HWMapContainer::setMissingTheme(const QString & name) { - if (name.isEmpty()) return; + if (name.isNull() || name.isEmpty()) return; m_theme = name; QPixmap pixMissing = QPixmap(":/res/missingTheme@2x.png");