{
public:
MockWaylandCompositor()
- : surfaceCreated(false)
+ : surfaceCreated(false),
+ surfaceCommitted(false),
+ __waylandSurface(nullptr)
{
__eventLoop = DSEventLoop::getInstance();
__waylandCompositor = DSWaylandCompositor::getInstance();
- __waylandCompositor->create();
- __waylandCompositor->registerCallbackSurfaceCreated(this, std::bind(&MockWaylandCompositor::onSurfaceCreated, this, std::placeholders::_1));
+
+ if (__waylandCompositor)
+ {
+ __waylandCompositor->create();
+ __waylandCompositor->registerCallbackSurfaceCreated(this, std::bind(&MockWaylandCompositor::onSurfaceCreated, this, std::placeholders::_1));
+ }
}
~MockWaylandCompositor()