From 505ae2088405e69a9ed2fbf38ef8a7da08a33779 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 12 May 2016 20:10:18 +0300 Subject: Fix wrong image loading in LangListModel. --- src/gui/models/langlistmodel.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/gui/models/langlistmodel.h b/src/gui/models/langlistmodel.h index 1adfb3e91..054af17ad 100644 --- a/src/gui/models/langlistmodel.h +++ b/src/gui/models/langlistmodel.h @@ -92,8 +92,16 @@ class LangListModel final : public ExtendedListModel { for (int f = 0; f < langs_count; f ++) { - mIcons[f] = resourceManager->getImage("graphics/flags/" - + LANG_NAME[f].icon); + const std::string icon = LANG_NAME[f].icon; + if (!icon.empty()) + { + mIcons[f] = resourceManager->getImage("graphics/flags/" + + icon); + } + else + { + mIcons[f] = nullptr; + } } } -- cgit v1.2.3-70-g09d2