diff --git a/src/WallpaperEngine/Render/Drivers/Detectors/CX11FullScreenDetector.cpp b/src/WallpaperEngine/Render/Drivers/Detectors/CX11FullScreenDetector.cpp index 2ce526f..c45f1fb 100644 --- a/src/WallpaperEngine/Render/Drivers/Detectors/CX11FullScreenDetector.cpp +++ b/src/WallpaperEngine/Render/Drivers/Detectors/CX11FullScreenDetector.cpp @@ -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; } -} \ No newline at end of file +} diff --git a/src/WallpaperEngine/Render/Drivers/Output/CX11Output.cpp b/src/WallpaperEngine/Render/Drivers/Output/CX11Output.cpp index 79be24b..5ec551c 100644 --- a/src/WallpaperEngine/Render/Drivers/Output/CX11Output.cpp +++ b/src/WallpaperEngine/Render/Drivers/Output/CX11Output.cpp @@ -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