summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-05-12 20:10:18 +0300
committerAndrei Karas <akaras@inbox.ru>2016-05-12 20:10:18 +0300
commit505ae2088405e69a9ed2fbf38ef8a7da08a33779 (patch)
tree488a17e5a881e4c40ec911a53d8017f19c05ee7f /src/gui
parentdc452b6d1908eced3388aa0284eac34ef65510ff (diff)
downloadplus-505ae2088405e69a9ed2fbf38ef8a7da08a33779.tar.gz
plus-505ae2088405e69a9ed2fbf38ef8a7da08a33779.tar.bz2
plus-505ae2088405e69a9ed2fbf38ef8a7da08a33779.tar.xz
plus-505ae2088405e69a9ed2fbf38ef8a7da08a33779.zip
Fix wrong image loading in LangListModel.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/models/langlistmodel.h12
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;
+ }
}
}