From 8939fcff13467297930d2655ff02e1523a9db84f Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Sun, 22 Jul 2001 16:34:30 +0000 Subject: [PATCH] Don't crash when mousing over certain icons. svn path=/trunk/kdebase/kwin/; revision=107192 --- clients/default/kdedefault.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/clients/default/kdedefault.cpp b/clients/default/kdedefault.cpp index 3e97172caf..10b9bd80ba 100644 --- a/clients/default/kdedefault.cpp +++ b/clients/default/kdedefault.cpp @@ -521,10 +521,12 @@ void KDEDefaultButton::drawButton(QPainter *p) // Intensify the image if required if (isMouseOver) { - QBitmap mask = *btnpix.mask(); - btnpix.detach(); - btnpix = KPixmapEffect::intensity(btnpix, 0.8); - btnpix.setMask( mask ); + const QBitmap* mask = btnpix.mask(); + if( mask != 0 ) { + btnpix.detach(); + btnpix = KPixmapEffect::intensity(btnpix, 0.8); + btnpix.setMask( *mask ); + } } // Smooth scale the pixmap for small titlebars