Diffstat (limited to 'kaddressbook/imagewidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kaddressbook/imagewidget.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kaddressbook/imagewidget.cpp b/kaddressbook/imagewidget.cpp index 1e9743c..d0f52ea 100644 --- a/kaddressbook/imagewidget.cpp +++ b/kaddressbook/imagewidget.cpp @@ -226,34 +226,35 @@ void ImageWidget::setLogo( const KABC::Picture &logo ) } KABC::Picture ImageWidget::logo() const { KABC::Picture logo; if ( mUseLogoUrl->isChecked() ) logo.setUrl( mLogoUrl->url() ); else { QPixmap *px = mLogoLabel->pixmap(); if ( px ) { #ifndef KAB_EMBEDDED if ( px->height() > px->width() ) logo.setData( px->convertToImage().scaleHeight( 140 ) ); else logo.setData( px->convertToImage().scaleWidth( 100 ) ); -#else //KAB_EMBEDDED - logo.setData( px->convertToImage() ); +#else //KAB_EMBEDDED + if (px->isNull() != true ) + logo.setData( px->convertToImage() ); #endif //KAB_EMBEDDED logo.setType( "PNG" ); } } return logo; } void ImageWidget::removePhoto() { setPhoto(KABC::Picture() ); } void ImageWidget::removeLogo() { setLogo(KABC::Picture() ); |