summaryrefslogtreecommitdiffstats
path: root/logic/profiler/JProfiler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'logic/profiler/JProfiler.cpp')
-rw-r--r--logic/profiler/JProfiler.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/logic/profiler/JProfiler.cpp b/logic/profiler/JProfiler.cpp
index 34f927ce..1cd8d128 100644
--- a/logic/profiler/JProfiler.cpp
+++ b/logic/profiler/JProfiler.cpp
@@ -26,13 +26,18 @@ void JProfiler::beginProfilingImpl(MinecraftProcess *process)
static_cast<void (QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished),
[this](int exit, QProcess::ExitStatus status)
{
- if (exit != 0 || status == QProcess::CrashExit)
+ if (status == QProcess::CrashExit)
{
emit abortLaunch(tr("Profiler aborted"));
}
- m_profilerProcess->deleteLater();
+ if (m_profilerProcess)
+ {
+ m_profilerProcess->deleteLater();
+ m_profilerProcess = 0;
+ }
});
profiler->start();
+ m_profilerProcess = profiler;
}
void JProfilerFactory::registerSettings(SettingsObject *settings)