Only load the decoration texture if the decoration pixmap is not null.

This resulted in a crash with Qt 4.6 when accessing the pixmap handle.
BUG: 213507

svn path=/trunk/KDE/kdebase/workspace/; revision=1068519
icc-effect-5.14.5
Martin Gräßlin 2010-01-01 11:57:06 +00:00
parent 7f9f60d6b9
commit 82093ae630
1 changed files with 3 additions and 1 deletions

View File

@ -1553,7 +1553,7 @@ void SceneOpenGL::Window::paintDecoration( const QPixmap* decoration, TextureTyp
// texture doesn't need updating, just bind it
glBindTexture( decorationTexture->target(), decorationTexture->texture());
}
else
else if( !decoration->isNull() )
{
bool success = decorationTexture->load( decoration->handle(), decoration->size(), decoration->depth() );
if( !success )
@ -1562,6 +1562,8 @@ void SceneOpenGL::Window::paintDecoration( const QPixmap* decoration, TextureTyp
return;
}
}
else
return;
if( filter == ImageFilterGood )
{
// avoid unneeded mipmap generation by only using trilinear