Ver Fonte

fix crash on 1 wp

vaxerski há 3 anos atrás
pai
commit
a782fdd1f2

+ 3 - 0
src/WallpaperEngine/Render/Drivers/CWaylandOpenGLDriver.cpp

@@ -459,6 +459,9 @@ void CWaylandOpenGLDriver::makeCurrent(const std::string& outputName) const {
 
 CLayerSurface* CWaylandOpenGLDriver::surfaceToLS(wl_surface* surface) {
     for (auto& o : m_outputs) {
+        if (!o->layerSurface.get())
+            continue;
+
         if (o->layerSurface->surface == surface)
             return o->layerSurface.get();
     }