guard surface in addsurfaceglobaloffset

This commit is contained in:
vaxerski 2022-09-13 21:49:55 +02:00
parent da10022d84
commit 5a146e9d90

View file

@ -3,6 +3,9 @@
#include "../Compositor.hpp" #include "../Compositor.hpp"
void addSurfaceGlobalOffset(SSurfaceTreeNode* node, int* lx, int* ly) { void addSurfaceGlobalOffset(SSurfaceTreeNode* node, int* lx, int* ly) {
if (!node->pSurface)
return; // ? how does this happen sometimes
*lx += node->pSurface->sx; *lx += node->pSurface->sx;
*ly += node->pSurface->sy; *ly += node->pSurface->sy;