Fix crash in setCrashReporterEnabled

This commit is contained in:
Dale Glass 2024-07-04 22:14:34 +02:00
parent f6f9d37527
commit 34f308ac48

View file

@ -457,6 +457,11 @@ bool startCrashHandler(std::string appPath, std::string crashURL, std::string cr
}
void setCrashReportingEnabled(bool enabled) {
if (!crashpadDatabase) {
qCCritical(crash_handler) << "Can't set to enabled, crash handler not initialized!";
return;
}
auto settings = crashpadDatabase->GetSettings();
settings->SetUploadsEnabled(enabled);