diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-05-12 20:10:18 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-05-12 20:10:18 +0300 |
commit | 505ae2088405e69a9ed2fbf38ef8a7da08a33779 (patch) | |
tree | 488a17e5a881e4c40ec911a53d8017f19c05ee7f | |
parent | dc452b6d1908eced3388aa0284eac34ef65510ff (diff) | |
download | mv-505ae2088405e69a9ed2fbf38ef8a7da08a33779.tar.gz mv-505ae2088405e69a9ed2fbf38ef8a7da08a33779.tar.bz2 mv-505ae2088405e69a9ed2fbf38ef8a7da08a33779.tar.xz mv-505ae2088405e69a9ed2fbf38ef8a7da08a33779.zip |
Fix wrong image loading in LangListModel.
-rw-r--r-- | src/gui/models/langlistmodel.h | 12 |
1 files 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; + } } } |