summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2015-04-02 20:18:23 +0200
committerPetr Mrázek <peterix@gmail.com>2015-04-12 20:57:17 +0200
commit28a39ef7ac3e3dfe4ea65d02af01d1a18e3d4af6 (patch)
treee6f28a5609af574ad811fe87e70fa354be097833
parentd313e9ab09639346526b75c92498188753cb5b87 (diff)
downloadMultiMC-28a39ef7ac3e3dfe4ea65d02af01d1a18e3d4af6.tar
MultiMC-28a39ef7ac3e3dfe4ea65d02af01d1a18e3d4af6.tar.gz
MultiMC-28a39ef7ac3e3dfe4ea65d02af01d1a18e3d4af6.tar.lz
MultiMC-28a39ef7ac3e3dfe4ea65d02af01d1a18e3d4af6.tar.xz
MultiMC-28a39ef7ac3e3dfe4ea65d02af01d1a18e3d4af6.zip
NOISSUE fix segfault when version list is null
-rw-r--r--logic/Env.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/logic/Env.cpp b/logic/Env.cpp
index 7ca206f2..68e76e4b 100644
--- a/logic/Env.cpp
+++ b/logic/Env.cpp
@@ -110,6 +110,10 @@ public:
BaseVersionPtr Env::getVersion(QString component, QString version)
{
auto list = getVersionList(component);
+ if(!list)
+ {
+ return nullptr;
+ }
return list->findVersion(version);
}