From 208e118924d648a472dafd18d11f3404e30ad8be Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Mon, 9 Jan 2017 15:21:47 +0100 Subject: Fix crash in Canvas The Image based code path will delete the texture in textureForNextFrame() so deleting it again here is wrong. The convention is supposed to be that if the textureForNextFrame returns 0, it also deleted the input texture. So not deleting is correct for both Image and FBO. Change-Id: I45a5ef94c13358f3637f51ae2d21224518ea6a25 Reviewed-by: Laszlo Agocs --- src/quick/items/context2d/qquickcanvasitem.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'src/quick/items/context2d/qquickcanvasitem.cpp') diff --git a/src/quick/items/context2d/qquickcanvasitem.cpp b/src/quick/items/context2d/qquickcanvasitem.cpp index 212148b754..28e9173bf7 100644 --- a/src/quick/items/context2d/qquickcanvasitem.cpp +++ b/src/quick/items/context2d/qquickcanvasitem.cpp @@ -766,7 +766,6 @@ QSGNode *QQuickCanvasItem::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData if (!texture) { delete node; d->node = 0; - delete d->nodeTexture; d->nodeTexture = 0; if (d->textureProvider) { d->textureProvider->tex = 0; -- cgit v1.2.3