Commit b2a21413b9c0eeec6a87e637b1c54c3058eb2ae2
Merge branch 'master' of https://github.com/biometrics/openbr
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 ***/ | ... | ... |