mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-09 23:57:34 +02:00
* Don't try to work on null-pixmaps.
This commit is contained in:
@@ -326,6 +326,9 @@ createRoundedImage( const QPixmap& pixmap, const QSize& size, float frameWidthPc
|
|||||||
width = pixmap.width();
|
width = pixmap.width();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( !height || !width )
|
||||||
|
return QPixmap();
|
||||||
|
|
||||||
int frameWidth = (float)width * frameWidthPct;
|
int frameWidth = (float)width * frameWidthPct;
|
||||||
|
|
||||||
QPixmap scaledAvatar = pixmap.scaled( width, height, Qt::IgnoreAspectRatio, Qt::SmoothTransformation );
|
QPixmap scaledAvatar = pixmap.scaled( width, height, Qt::IgnoreAspectRatio, Qt::SmoothTransformation );
|
||||||
|
Reference in New Issue
Block a user