r23731 by jghali - Fix coverity 1463098: Unchecked dynamic_cast
scribus-commit
scribus-commit at lists.scribus.net
Sun May 10 12:57:11 UTC 2020
Author: jghali
Date: Sun May 10 12:57:11 2020
New Revision: 23731
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23731
Log:
Fix coverity 1463098: 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=23731&path=/trunk/Scribus/scribus/ui/stylecombos.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/stylecombos.cpp (original)
+++ trunk/Scribus/scribus/ui/stylecombos.cpp Sun May 10 12:57:11 2020
@@ -399,10 +399,14 @@
setCurrentIndex(newIndex);
}
}
+
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