__wm(nullptr)
{
__waylandCompositor = DSWaylandCompositor::getInstance();
- __waylandCompositor->registerCallbackSurfaceCreated(this, std::bind(&DSZone::__onSurfaceCreated, this, std::placeholders::_1));
- __waylandCompositor->registerCallbackSurfaceDestroy(this, std::bind(&DSZone::__onSurfaceDestroy, this, std::placeholders::_1));
+ if (__waylandCompositor)
+ {
+ __waylandCompositor->registerCallbackSurfaceCreated(this, std::bind(&DSZone::__onSurfaceCreated, this, std::placeholders::_1));
+ __waylandCompositor->registerCallbackSurfaceDestroy(this, std::bind(&DSZone::__onSurfaceDestroy, this, std::placeholders::_1));
+ }
__wm = DSWindowManager::getInstance();
if (__wm)