summaryrefslogtreecommitdiff
path: root/src/gui/models/namesmodel.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-06-24 01:52:52 +0300
committerAndrei Karas <akaras@inbox.ru>2015-06-25 15:07:19 +0300
commit841fe55e67ea467a8e2192dee5c169d282a35148 (patch)
tree2b6731fbab51c7cbc7224dbfa364c462a2528651 /src/gui/models/namesmodel.cpp
parent233f2b564e7707f79deb493444f28363ac10bfd4 (diff)
downloadmanaverse-841fe55e67ea467a8e2192dee5c169d282a35148.tar.gz
manaverse-841fe55e67ea467a8e2192dee5c169d282a35148.tar.bz2
manaverse-841fe55e67ea467a8e2192dee5c169d282a35148.tar.xz
manaverse-841fe55e67ea467a8e2192dee5c169d282a35148.zip
Add missing checks into models.
Diffstat (limited to 'src/gui/models/namesmodel.cpp')
-rw-r--r--src/gui/models/namesmodel.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/models/namesmodel.cpp b/src/gui/models/namesmodel.cpp
index ed0d78269..b3137d264 100644
--- a/src/gui/models/namesmodel.cpp
+++ b/src/gui/models/namesmodel.cpp
@@ -47,6 +47,8 @@ std::string NamesModel::getElementAt(int i)
void NamesModel::fillFromArray(const char *const *const arr, std::size_t sz)
{
+ if (!arr)
+ return;
for (size_t f = 0; f < sz; f ++)
mNames.push_back(gettext(arr[f]));
}