PVS: V595 The pointer was utilized before it was verified against nullptr

This commit is contained in:
wmayer
2019-02-17 20:55:52 +01:00
parent 1e343d339f
commit 2bb5797568
7 changed files with 34 additions and 34 deletions

View File

@@ -143,6 +143,10 @@ void QGVPage::drawBackground(QPainter *p, const QRectF &)
if(!drawBkg)
return;
if(!m_vpPage) {
return;
}
if (!m_vpPage->getDrawPage()) {
//Base::Console().Log("TROUBLE - QGVP::drawBackground - no Page Object!\n");
return;
@@ -155,10 +159,6 @@ void QGVPage::drawBackground(QPainter *p, const QRectF &)
p->setBrush(*bkgBrush);
p->drawRect(viewport()->rect().adjusted(-2,-2,2,2)); //just bigger than viewport to prevent artifacts
if(!m_vpPage) {
return;
}
// Default to A3 landscape, though this is currently relevant
// only for opening corrupt docs, etc.
float pageWidth = 420,