Skip to content

Commit

Permalink
Fix segfault when using midi.sendShortMsg and platform vnc
Browse files Browse the repository at this point in the history
This fixes lp1956144 by adding a missing null check
  • Loading branch information
admindotnu authored and daschuer committed Jan 18, 2022
1 parent 93c321e commit ac5e4c4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/util/screensaver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,10 @@ void ScreenSaverHelper::triggerUserActivity()
name=getenv("DISPLAY");
}
display=XOpenDisplay(name);
XResetScreenSaver(display);
XCloseDisplay(display);
if (display != nullptr) {
XResetScreenSaver(display);
XCloseDisplay(display);
}
return;
}
// Disabling the method with DBus since it seems to be failing on several systems.
Expand Down

0 comments on commit ac5e4c4

Please sign in to comment.