Skip to content

Commit 249e405

Browse files
committedMay 5, 2020
[image cache] Avoid creating an invalid image and painting onto it
1 parent 5cd87c1 commit 249e405

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎src/core/qgsimagecache.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,10 @@ QImage QgsImageCache::renderImage( const QString &path, QSize size, const bool k
208208
{
209209
isBroken = true;
210210

211+
// if the size parameter is not valid, skip drawing of missing image symbol
212+
if ( !size.isValid() )
213+
return im;
214+
211215
// if image size is set to respect aspect ratio, correct for broken image aspect ratio
212216
if ( size.width() == 0 )
213217
size.setWidth( size.height() );

0 commit comments

Comments
 (0)
Please sign in to comment.