summaryrefslogtreecommitdiff
path: root/launcher/minecraft/Library_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'launcher/minecraft/Library_test.cpp')
-rw-r--r--launcher/minecraft/Library_test.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/launcher/minecraft/Library_test.cpp b/launcher/minecraft/Library_test.cpp
index 47531ad6f3..76f8547924 100644
--- a/launcher/minecraft/Library_test.cpp
+++ b/launcher/minecraft/Library_test.cpp
@@ -15,7 +15,8 @@ private:
{
auto path = QFINDTESTDATA(file);
QFile jsonFile(path);
- jsonFile.open(QIODevice::ReadOnly);
+ if (!jsonFile.open(QIODevice::ReadOnly))
+ return nullptr;
auto data = jsonFile.readAll();
jsonFile.close();
ProblemContainer problems;