summaryrefslogtreecommitdiff
path: root/src/gui/models/serverslistmodel.h
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/serverslistmodel.h
parent233f2b564e7707f79deb493444f28363ac10bfd4 (diff)
downloadplus-841fe55e67ea467a8e2192dee5c169d282a35148.tar.gz
plus-841fe55e67ea467a8e2192dee5c169d282a35148.tar.bz2
plus-841fe55e67ea467a8e2192dee5c169d282a35148.tar.xz
plus-841fe55e67ea467a8e2192dee5c169d282a35148.zip
Add missing checks into models.
Diffstat (limited to 'src/gui/models/serverslistmodel.h')
-rw-r--r--src/gui/models/serverslistmodel.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/models/serverslistmodel.h b/src/gui/models/serverslistmodel.h
index 864cc70c6..d3d0aec26 100644
--- a/src/gui/models/serverslistmodel.h
+++ b/src/gui/models/serverslistmodel.h
@@ -42,7 +42,8 @@ class ServersListModel final : public ListModel
ServersListModel(ServerInfos *const servers,
ServerDialog *const parent) :
mServers(servers),
- mVersionStrings(servers->size(), VersionString(0, "")),
+ mVersionStrings(servers ? servers->size() : 0,
+ VersionString(0, "")),
mParent(parent)
{
}