Commit e25c535f52b1495de002e0be161caba8d4a07a61

Authored by Josh Klontz
1 parent 53366b1a

fixed size hint edge case

Showing 1 changed file with 1 additions and 1 deletions
openbr/gui/imageviewer.cpp
... ... @@ -80,7 +80,7 @@ void br::ImageViewer::updatePixmap(QImage image, bool async)
80 80  
81 81 QSize br::ImageViewer::sizeHint() const
82 82 {
83   - return QSize(width(), (src.height() * width() + /* round up */ src.width() - 1) / src.width());
  83 + return src.isNull() ? QSize() : QSize(width(), (src.height() * width() + /* round up */ src.width() - 1) / src.width());
84 84 }
85 85  
86 86 /*** PROTECTED SLOTS ***/
... ...