diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2013-09-13 13:42:42 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2013-09-13 13:42:42 (GMT) |
commit | 8f3671693a681f74f9c121fff4d49c0c37915088 (patch) | |
tree | 18d76556f9cb1aa2507dbaec598ea6b508ddf9a7 /src/util.cpp | |
parent | 0de73f595c8695344860cfc65d1d260b1e3c8c15 (diff) | |
download | Doxygen-8f3671693a681f74f9c121fff4d49c0c37915088.zip Doxygen-8f3671693a681f74f9c121fff4d49c0c37915088.tar.gz Doxygen-8f3671693a681f74f9c121fff4d49c0c37915088.tar.bz2 |
Minor layout tweaks and extra guard
Diffstat (limited to 'src/util.cpp')
-rw-r--r-- | src/util.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/util.cpp b/src/util.cpp index 83eb095..5abe4ed 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -4311,14 +4311,21 @@ bool getDefs(const QCString &scName, { //printf("multiple results; pick one from file:%s\n", currentFile->name().data()); md = members.first(); - while (md) { - if (md->getFileDef()->name() == currentFile->name()) - break; + while (md) + { + if (md->getFileDef() && md->getFileDef()->name() == currentFile->name()) + { + break; // found match in the current file + } md=members.next(); } - if (!md) + if (!md) // member not in the current file + { md=members.last(); - } else { + } + } + else + { md=members.last(); } } |