mirror of
https://github.com/hyprwm/hyprpaper.git
synced 2024-09-11 19:07:40 +03:00
fix crash with empty buffers
This commit is contained in:
parent
715175a121
commit
22bbffa1ae
@ -317,7 +317,19 @@ void CHyprpaper::renderWallpaperForMonitor(SMonitor* pMonitor) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
auto *const PBUFFER = getPoolBuffer(pMonitor, PWALLPAPERTARGET);
|
||||
auto* PBUFFER = getPoolBuffer(pMonitor, PWALLPAPERTARGET);
|
||||
|
||||
if (!PBUFFER) {
|
||||
Debug::log(LOG, "Pool buffer missing for available target??");
|
||||
ensurePoolBuffersPresent();
|
||||
|
||||
PBUFFER = getPoolBuffer(pMonitor, PWALLPAPERTARGET);
|
||||
|
||||
if (!PBUFFER) {
|
||||
Debug::log(LOG, "Pool buffer failed #2. Ignoring WP.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
const auto PCAIRO = PBUFFER->cairo;
|
||||
cairo_save(PCAIRO);
|
||||
|
Loading…
Reference in New Issue
Block a user