diff options
| author | Marc Mutz <marc.mutz@kdab.com> | 2013-09-15 18:51:36 +0200 |
|---|---|---|
| committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-17 09:31:25 +0200 |
| commit | 250190b39bed279ca075bf1f2b2aaf6839bb9be4 (patch) | |
| tree | ef4af6cd6529e899d02e19b11bddd79c290e3cc7 /src/tools/qdoc/cppcodeparser.cpp | |
| parent | bc9c03a550ea502a5f29004054a7fc2f1f844134 (diff) | |
QMap: don't dereference nullptr
root(), leftNode() and rightNode() can be nullptr.
These pieces of code happened to work because the first thing lowerBound()
does is
Node *n = this;
// ...
while (n)
// ...
But that is _after_ dereferencing nullptr, which is undefined behavior.
So, check first, then deref.
Change-Id: I9137bf6e21014cd68404a7e49a748910b1d768cf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/tools/qdoc/cppcodeparser.cpp')
0 files changed, 0 insertions, 0 deletions
