From 841fe55e67ea467a8e2192dee5c169d282a35148 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 24 Jun 2015 01:52:52 +0300 Subject: Add missing checks into models. --- src/gui/models/serverslistmodel.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/gui/models/serverslistmodel.h') 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) { } -- cgit v1.2.3-70-g09d2