diff options
author | Gunnar Sletta <gunnar.sletta@nokia.com> | 2011-05-23 12:45:12 +0200 |
---|---|---|
committer | Gunnar Sletta <gunnar.sletta@nokia.com> | 2011-05-23 13:45:15 +0200 |
commit | 2a720d2056b6f0b78b6d24928f7e2d9f8a38edb3 (patch) | |
tree | ab73d5855b0b965cea1120a39b14fa457517ed04 /src/imports/particles | |
parent | 9605fc786482bdd208cc3bfe92f318f7c314329c (diff) |
Don't store texture references after the view has gone away
This is a partial fix only. We will eventually need to get
proper sharing of resources across multiple GL contexts, but this
fixes the autotest and will work for most usecases.
The task QTBUG-19455 has been created to solve it properly.
Diffstat (limited to 'src/imports/particles')
-rw-r--r-- | src/imports/particles/pictureaffector.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/imports/particles/pictureaffector.cpp b/src/imports/particles/pictureaffector.cpp index d684b3fd80..636e26b830 100644 --- a/src/imports/particles/pictureaffector.cpp +++ b/src/imports/particles/pictureaffector.cpp @@ -72,9 +72,7 @@ void PictureAffector::startLoadImage() } void PictureAffector::loadImage() { - QSGPlainTexture* ptext = qobject_cast<QSGPlainTexture*>(m_pix->texture()); - if(ptext) - m_loadedImage = ptext->image(); + m_loadedImage = m_pix->pixmap().toImage(); if(m_loadedImage.isNull()) qWarning() << "PictureAffector could not load picture " << m_image; } |