diff options
author | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2011-05-18 17:49:06 +0200 |
---|---|---|
committer | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2011-05-18 17:49:06 +0200 |
commit | acbc84876a39380982848036ff0f9eaadd6a0593 (patch) | |
tree | 585c734247f1544efafb36e9c536c5492ef5d73b /src/declarative/items/qsgimage.cpp | |
parent | 7ef7dd68dc66226b01ea49a081a8c106ca545cea (diff) |
Fixed crash when Image/ShaderEffectSource source is missing.
Diffstat (limited to 'src/declarative/items/qsgimage.cpp')
-rw-r--r-- | src/declarative/items/qsgimage.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/declarative/items/qsgimage.cpp b/src/declarative/items/qsgimage.cpp index 10670f4015..d280ef08a1 100644 --- a/src/declarative/items/qsgimage.cpp +++ b/src/declarative/items/qsgimage.cpp @@ -179,10 +179,12 @@ QSGTexture *QSGImage::texture() const { Q_D(const QSGImage); QSGTexture *t = d->pix.texture(); - t->setFiltering(QSGItemPrivate::get(this)->smooth ? QSGTexture::Linear : QSGTexture::Nearest); - t->setMipmapFiltering(QSGTexture::None); - t->setHorizontalWrapMode(QSGTexture::ClampToEdge); - t->setVerticalWrapMode(QSGTexture::ClampToEdge); + if (t) { + t->setFiltering(QSGItemPrivate::get(this)->smooth ? QSGTexture::Linear : QSGTexture::Nearest); + t->setMipmapFiltering(QSGTexture::None); + t->setHorizontalWrapMode(QSGTexture::ClampToEdge); + t->setVerticalWrapMode(QSGTexture::ClampToEdge); + } return t; } |