mirror of
https://github.com/hyprwm/hyprpaper.git
synced 2024-11-16 22:25:59 +01:00
fix crash with empty buffers
This commit is contained in:
parent
715175a121
commit
22bbffa1ae
1 changed files with 13 additions and 1 deletions
|
@ -317,7 +317,19 @@ void CHyprpaper::renderWallpaperForMonitor(SMonitor* pMonitor) {
|
||||||
exit(1);
|
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;
|
const auto PCAIRO = PBUFFER->cairo;
|
||||||
cairo_save(PCAIRO);
|
cairo_save(PCAIRO);
|
||||||
|
|
Loading…
Reference in a new issue