added checks to mitigate floating point crashes

This commit is contained in:
fourtf
2020-04-19 21:05:40 +02:00
parent 6b512d1052
commit 6052846bc3
12 changed files with 74 additions and 40 deletions
+5 -2
View File
@@ -32,8 +32,11 @@ AboutPage::AboutPage()
auto logo = layout.emplace<QLabel>().assign(&this->logo_);
logo->setPixmap(pixmap);
logo->setFixedSize(PIXMAP_WIDTH,
PIXMAP_WIDTH * pixmap.height() / pixmap.width());
if (pixmap.width() != 0)
{
logo->setFixedSize(PIXMAP_WIDTH,
PIXMAP_WIDTH * pixmap.height() / pixmap.width());
}
logo->setScaledContents(true);
// this does nothing