mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-22 13:43:11 +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
|
QPixmap
|
||||||
ImageRegistry::pixmap( const QString& image, const QSize& size, TomahawkUtils::ImageMode mode, float opacity, QColor tint )
|
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< qint64, QPixmap > subsubcache;
|
||||||
QHash< int, QHash< qint64, QPixmap > > subcache;
|
QHash< int, QHash< qint64, QPixmap > > subcache;
|
||||||
|
|
||||||
|
@@ -478,6 +478,11 @@ QPixmap
|
|||||||
defaultPixmap( ImageType type, ImageMode mode, const QSize& size )
|
defaultPixmap( ImageType type, ImageMode mode, const QSize& size )
|
||||||
{
|
{
|
||||||
QPixmap pixmap;
|
QPixmap pixmap;
|
||||||
|
if ( size.width() < 0 || size.height() < 0 )
|
||||||
|
{
|
||||||
|
Q_ASSERT( false );
|
||||||
|
return pixmap;
|
||||||
|
}
|
||||||
|
|
||||||
switch ( type )
|
switch ( type )
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user