[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdenetwork/kopete/libkopete/ui
From:       Roman Jarosz <kedgedev () centrum ! cz>
Date:       2008-02-11 21:22:12
Message-ID: 1202764932.778674.23088.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 773834 by rjarosz:

Fix bug 157683: Adding avatar crashes kopete
We have to check if avatar isn't null.

BUG: 157683



 M  +5 -1      avatarselectorwidget.cpp  


--- trunk/KDE/kdenetwork/kopete/libkopete/ui/avatarselectorwidget.cpp #773833:773834
@@ -182,8 +182,12 @@
 		if( !imageUrl.isLocalFile() )
 			return;
 
+		QPixmap pixmap( imageUrl.path() );
+		if ( pixmap.isNull() )
+			return;
+
 		// Crop the image
-		QImage avatar = KPixmapRegionSelectorDialog::getSelectedImage( \
QPixmap(imageUrl.path()), 96, 96, this ); +		QImage avatar = \
KPixmapRegionSelectorDialog::getSelectedImage( pixmap, 96, 96, this );  
 		QString imageName = imageUrl.fileName();
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic