Commit 486d367e authored by Gunnar Sletta's avatar Gunnar Sletta Committed by The Qt Project
Browse files

Prevent badly formed texture nodes in the scene graph.


A texture based node without a valid texture is not allowed,
as the material and the renderer will only tolerate
well-formed nodes. If a node is missing any part of its material
state it should not be in the scene graph in the first place.

Because of an "optimization" in QSGDefaultImageNode::setTexture
and QSGSimpleTextureNode::setTexture, we must temporarily set
the texture to 0 to ensure that it gets updated properly. This
temporarily puts the node into an invalid state which can lead
to crashes when QSGNode::markDirty() reaches the renderer.

Task-number: QTBUG-34062
Change-Id: Ic1735c9b974b90b3684262de9589133c961bac6e
Reviewed-by: default avatarLaszlo Agocs <laszlo.agocs@digia.com>
parent 19d68067
No related merge requests found
Showing with 10 additions and 10 deletions
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment