diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-04-15 10:58:46 +0100 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-04-15 10:58:46 +0100 |
| commit | 29fc410a8f05c5eb0edcc9b1b24a2a4d4ed48c09 (patch) | |
| tree | 2f4c79892e7f571dee0836631f3059cb6095ee75 /src/debug/CrashReporter.cpp | |
| parent | 83f1616a65091fe2e66d054f5ef1343d755a3e0c (diff) | |
crashReporter: avoid segfault in deref plugin system
Diffstat (limited to 'src/debug/CrashReporter.cpp')
| -rw-r--r-- | src/debug/CrashReporter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/debug/CrashReporter.cpp b/src/debug/CrashReporter.cpp index d553b7b0..e7ffb144 100644 --- a/src/debug/CrashReporter.cpp +++ b/src/debug/CrashReporter.cpp @@ -48,7 +48,7 @@ void CrashReporter::createAndSaveCrash(int sig) { finalCrashReport += getFormat("Version: %s\n\n", GIT_COMMIT_HASH); - if (!g_pPluginSystem->getAllPlugins().empty()) { + if (g_pPluginSystem && !g_pPluginSystem->getAllPlugins().empty()) { finalCrashReport += "Hyprland seems to be running with plugins. This crash might not be Hyprland's fault.\nPlugins:\n"; for (auto& p : g_pPluginSystem->getAllPlugins()) { @@ -128,7 +128,7 @@ void CrashReporter::createAndSaveCrash(int sig) { finalCrashReport += execAndGet(("cat \"" + Debug::logFile + "\" | tail -n 50").c_str()); - const auto HOME = getenv("HOME"); + const auto HOME = getenv("HOME"); const auto CACHE_HOME = getenv("XDG_CACHE_HOME"); if (!HOME) |
