mirror of
https://github.com/Almamu/linux-wallpaperengine.git
synced 2025-07-16 14:22:24 +08:00
Fix crash when 2+ screens are connected but not all are active in X11
When not all connected screens are active XRRGetCrtcInfo returns NULL for the inactive screens resulting in a SIGSEGV when trying to push it to the screens vector.
This commit is contained in:
parent
cdf571f6a4
commit
ee499b06e2
@ -155,6 +155,9 @@ namespace WallpaperEngine::Render::Drivers::Detectors
|
||||
|
||||
XRRCrtcInfo* crtc = XRRGetCrtcInfo (this->m_display, screenResources, info->crtc);
|
||||
|
||||
if (crtc == nullptr)
|
||||
continue;
|
||||
|
||||
// add the screen to the list of screens
|
||||
this->m_screens.push_back (
|
||||
{
|
||||
@ -178,4 +181,4 @@ namespace WallpaperEngine::Render::Drivers::Detectors
|
||||
this->m_display = nullptr;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -136,6 +136,9 @@ void CX11Output::loadScreenInfo ()
|
||||
|
||||
XRRCrtcInfo* crtc = XRRGetCrtcInfo (this->m_display, screenResources, info->crtc);
|
||||
|
||||
if (crtc == nullptr)
|
||||
continue;
|
||||
|
||||
// add the screen to the list of screens
|
||||
this->m_screens.push_back (
|
||||
new CX11OutputViewport
|
||||
|
Loading…
Reference in New Issue
Block a user