PVS: V595 The pointer was utilized before it was verified against nullptr
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user