guard surface in addsurfaceglobaloffset

This commit is contained in:
vaxerski 2022-09-13 21:49:55 +02:00
parent da10022d84
commit 5a146e9d90
1 changed files with 3 additions and 0 deletions

View File

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