From 413ccc307639db74e837cfca1c2a7e23f4989065 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Thu, 10 Oct 2024 17:46:11 +0200 Subject: [PATCH] Crashpad: Do not start if not enabled If the user doesn't have enabled crashreports, even local saving should be disabled. Change-Id: I809389eba7c1acf0d3a8429dfe3c648f3b56542e Reviewed-by: hjk --- src/app/main.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/app/main.cpp b/src/app/main.cpp index 755169fc8db..6e632917532 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -410,8 +410,11 @@ QStringList lastSessionArgument() } #ifdef ENABLE_CRASHPAD -bool startCrashpad(const AppInfo &appInfo, bool crashReportingEnabled) +void startCrashpad(const AppInfo &appInfo, bool crashReportingEnabled) { + if (!crashReportingEnabled) + return; + using namespace crashpad; // Cache directory that will store crashpad information and minidumps @@ -445,7 +448,7 @@ bool startCrashpad(const AppInfo &appInfo, bool crashReportingEnabled) arguments.push_back("--no-rate-limit"); CrashpadClient *client = new CrashpadClient(); - bool success = client->StartHandler( + client->StartHandler( handler, database, database, @@ -453,10 +456,7 @@ bool startCrashpad(const AppInfo &appInfo, bool crashReportingEnabled) annotations, arguments, /* restartable */ true, - /* asynchronous_start */ true - ); - - return success; + /* asynchronous_start */ true); } #endif