mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 10:25:58 +01:00
crashReporter: avoid segfault in deref plugin system
This commit is contained in:
parent
83f1616a65
commit
29fc410a8f
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue