summaryrefslogtreecommitdiffstats
path: root/src/qt3support
diff options
context:
space:
mode:
authorZachary Blair <zack_blair@hotmail.com>2010-06-27 20:38:16 (GMT)
committerAndreas Kling <andreas.kling@nokia.com>2010-06-27 20:38:24 (GMT)
commit9acf20771b624132833b2ca1e8bc421f69774f1e (patch)
tree2dac345e7f7b730609341bb4f15f61a362bea8c0 /src/qt3support
parent211d51adae4d3914544c6b3f82caf66a99af03ec (diff)
downloadQt-9acf20771b624132833b2ca1e8bc421f69774f1e.zip
Qt-9acf20771b624132833b2ca1e8bc421f69774f1e.tar.gz
Qt-9acf20771b624132833b2ca1e8bc421f69774f1e.tar.bz2
Fix suspicious code found by static code analysis:
* Missing break in switch * delete instead of delete[] * Null-pointer check after dereference Merge-request: 716 Reviewed-by: Andreas Kling <andreas.kling@nokia.com>
Diffstat (limited to 'src/qt3support')
-rw-r--r--src/qt3support/text/q3richtext.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qt3support/text/q3richtext.cpp b/src/qt3support/text/q3richtext.cpp
index 8614076..625dd95 100644
--- a/src/qt3support/text/q3richtext.cpp
+++ b/src/qt3support/text/q3richtext.cpp
@@ -8079,9 +8079,9 @@ bool Q3TextTable::down(Q3TextCursor *c, Q3TextDocument *&doc, Q3TextParagraph *&
break;
}
}
- doc = cell->richText();
if (!cell)
return false;
+ doc = cell->richText();
parag = doc->firstParagraph();
idx = 0;
ox += cell->geometry().x() + cell->horizontalAlignmentOffset() + outerborder + parent->x();
@@ -8117,9 +8117,9 @@ bool Q3TextTable::up(Q3TextCursor *c, Q3TextDocument *&doc, Q3TextParagraph *&pa
break;
}
}
- doc = cell->richText();
if (!cell)
return false;
+ doc = cell->richText();
parag = doc->lastParagraph();
idx = parag->length() - 1;
ox += cell->geometry().x() + cell->horizontalAlignmentOffset() + outerborder + parent->x();