r23738 by jghali - Fix coverity 1463108: Unchecked dynamic_cast
scribus-commit
scribus-commit at lists.scribus.net
Sun May 10 15:00:55 UTC 2020
Author: jghali
Date: Sun May 10 15:00:55 2020
New Revision: 23738
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23738
Log:
Fix coverity 1463108: Unchecked dynamic_cast
Modified:
trunk/Scribus/scribus/ui/stylecombos.cpp
Modified: trunk/Scribus/scribus/ui/stylecombos.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23738&path=/trunk/Scribus/scribus/ui/stylecombos.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/stylecombos.cpp (original)
+++ trunk/Scribus/scribus/ui/stylecombos.cpp Sun May 10 15:00:55 2020
@@ -532,9 +532,12 @@
}
}
QListView *tmpView = dynamic_cast<QListView*>(view());
- int tmpWidth = tmpView->sizeHintForColumn(0);
- if (tmpWidth > 0)
- tmpView->setMinimumWidth(tmpWidth + 24);
+ if (tmpView)
+ {
+ int tmpWidth = tmpView->sizeHintForColumn(0);
+ if (tmpWidth > 0)
+ tmpView->setMinimumWidth(tmpWidth + 24);
+ }
this->blockSignals(sigBlocked);
}
More information about the scribus-commit
mailing list