summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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;
+ }
}
}