From: Gunnar Sletta Date: Thu, 14 Apr 2011 12:18:20 +0000 (+0200) Subject: work X-Git-Tag: qt-v5.0.0-alpha1~311 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a7f108b441509b19fee9ba7549f8f076eeb56394;p=profile%2Fivi%2Fqtwayland.git work --- diff --git a/src/qt-compositor/compositor_api/waylandsurfaceitem.cpp b/src/qt-compositor/compositor_api/waylandsurfaceitem.cpp index 52e2841..b391ba6 100644 --- a/src/qt-compositor/compositor_api/waylandsurfaceitem.cpp +++ b/src/qt-compositor/compositor_api/waylandsurfaceitem.cpp @@ -95,7 +95,7 @@ void WaylandSurfaceItem::init(WaylandSurface *surface) connect(surface, SIGNAL(mapped(const QRect &)), this, SLOT(surfaceMapped(const QRect &))); connect(surface, SIGNAL(destroyed(QObject *)), this, SLOT(surfaceDestroyed(QObject *))); connect(this, SIGNAL(textureChanged()), this, SLOT(update())); - connect(this, SIGNAL(damaged(const QRect &)), this, SLOT(surfaceDamaged(const QRect &))); + connect(surface, SIGNAL(damaged(const QRect &)), this, SLOT(surfaceDamaged(const QRect &))); } WaylandSurfaceItem::~WaylandSurfaceItem() @@ -170,6 +170,12 @@ void WaylandSurfaceItem::surfaceDestroyed(QObject *) QSGNode *WaylandSurfaceItem::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) { QSGSimpleTextureNode *node = static_cast(oldNode); + + if (!m_texture) { + delete oldNode; + return 0; + } + if (!node) { node = new QSGSimpleTextureNode(); node->setTexture(m_texture);