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
This commit is contained in:
parent
7f9f60d6b9
commit
82093ae630
1 changed files with 3 additions and 1 deletions
|
@ -1553,7 +1553,7 @@ void SceneOpenGL::Window::paintDecoration( const QPixmap* decoration, TextureTyp
|
||||||
// texture doesn't need updating, just bind it
|
// texture doesn't need updating, just bind it
|
||||||
glBindTexture( decorationTexture->target(), decorationTexture->texture());
|
glBindTexture( decorationTexture->target(), decorationTexture->texture());
|
||||||
}
|
}
|
||||||
else
|
else if( !decoration->isNull() )
|
||||||
{
|
{
|
||||||
bool success = decorationTexture->load( decoration->handle(), decoration->size(), decoration->depth() );
|
bool success = decorationTexture->load( decoration->handle(), decoration->size(), decoration->depth() );
|
||||||
if( !success )
|
if( !success )
|
||||||
|
@ -1562,6 +1562,8 @@ void SceneOpenGL::Window::paintDecoration( const QPixmap* decoration, TextureTyp
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
return;
|
||||||
if( filter == ImageFilterGood )
|
if( filter == ImageFilterGood )
|
||||||
{
|
{
|
||||||
// avoid unneeded mipmap generation by only using trilinear
|
// avoid unneeded mipmap generation by only using trilinear
|
||||||
|
|
Loading…
Reference in a new issue