Fix video nodes material comparison.
Don't consider a material equal to another when their texture IDs are not available yet. Change-Id: Id4127d71abb2db33950a206dc722b24ab626e960 Task-number: QTBUG-47205 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
This commit is contained in:
@@ -138,6 +138,10 @@ public:
|
||||
|
||||
virtual int compare(const QSGMaterial *other) const {
|
||||
const QSGVideoMaterial_Texture *m = static_cast<const QSGVideoMaterial_Texture *>(other);
|
||||
|
||||
if (!m_textureId)
|
||||
return 1;
|
||||
|
||||
int diff = m_textureId - m->m_textureId;
|
||||
if (diff)
|
||||
return diff;
|
||||
|
||||
Reference in New Issue
Block a user