summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qtextcontrol.cpp
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-08-17 11:59:43 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-08-17 12:13:57 (GMT)
commit38f41726cf3a76a57ca15f7cc82e56a5aa2c5a1c (patch)
tree5c63dcc03caf4cc3817a4282cf200afecf62583b /src/gui/text/qtextcontrol.cpp
parentb80312254e61986e6848d1608dcac54e0b3f191a (diff)
downloadQt-38f41726cf3a76a57ca15f7cc82e56a5aa2c5a1c.zip
Qt-38f41726cf3a76a57ca15f7cc82e56a5aa2c5a1c.tar.gz
Qt-38f41726cf3a76a57ca15f7cc82e56a5aa2c5a1c.tar.bz2
QTextControl::print: fix coverity warning
the test was wrong on the QPrinter pointer In addition, priv is never null
Diffstat (limited to 'src/gui/text/qtextcontrol.cpp')
-rw-r--r--src/gui/text/qtextcontrol.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/qtextcontrol.cpp b/src/gui/text/qtextcontrol.cpp
index 58f8a06..1c14d20 100644
--- a/src/gui/text/qtextcontrol.cpp
+++ b/src/gui/text/qtextcontrol.cpp
@@ -2262,7 +2262,7 @@ void QTextControl::print(QPrinter *printer) const
{
#ifndef QT_NO_PRINTER
Q_D(const QTextControl);
- if (printer && !printer->isValid())
+ if (!printer || !printer->isValid())
return;
QTextDocument *tempDoc = 0;
const QTextDocument *doc = d->doc;