mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-21 05:11:44 +02:00
* Assert when image with negative size is being requested.
This commit is contained in:
@@ -57,6 +57,12 @@ ImageRegistry::cacheKey( const QSize& size, float opacity, QColor tint )
|
||||
QPixmap
|
||||
ImageRegistry::pixmap( const QString& image, const QSize& size, TomahawkUtils::ImageMode mode, float opacity, QColor tint )
|
||||
{
|
||||
if ( size.width() < 0 || size.height() < 0 )
|
||||
{
|
||||
Q_ASSERT( false );
|
||||
return QPixmap();
|
||||
}
|
||||
|
||||
QHash< qint64, QPixmap > subsubcache;
|
||||
QHash< int, QHash< qint64, QPixmap > > subcache;
|
||||
|
||||
|
@@ -478,6 +478,11 @@ QPixmap
|
||||
defaultPixmap( ImageType type, ImageMode mode, const QSize& size )
|
||||
{
|
||||
QPixmap pixmap;
|
||||
if ( size.width() < 0 || size.height() < 0 )
|
||||
{
|
||||
Q_ASSERT( false );
|
||||
return pixmap;
|
||||
}
|
||||
|
||||
switch ( type )
|
||||
{
|
||||
|
Reference in New Issue
Block a user