summaryrefslogtreecommitdiffstats
path: root/src/template.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2021-01-05 18:08:12 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2021-01-05 18:08:12 (GMT)
commit3f4717ec5583dde8116205e1045095158ab56c15 (patch)
treec92a755efa7a5ae4a87f9f2201e04a6f7354ae90 /src/template.cpp
parent9884d11f94d6c0ea00c6962a38c608ce7f21ed9b (diff)
downloadDoxygen-3f4717ec5583dde8116205e1045095158ab56c15.zip
Doxygen-3f4717ec5583dde8116205e1045095158ab56c15.tar.gz
Doxygen-3f4717ec5583dde8116205e1045095158ab56c15.tar.bz2
Various fixes based on coverity scan results
Diffstat (limited to 'src/template.cpp')
-rw-r--r--src/template.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/template.cpp b/src/template.cpp
index 58188fe..d5e8275 100644
--- a/src/template.cpp
+++ b/src/template.cpp
@@ -2669,7 +2669,10 @@ void TemplateContextImpl::addIndexEntry(const QCString &indexName,const std::vec
if (list->count()>0)
{
TemplateStruct *lastEntry = dynamic_cast<TemplateStruct*>(list->at(list->count()-1).toStruct());
- lastEntry->set("last",false);
+ if (lastEntry)
+ {
+ lastEntry->set("last",false);
+ }
}
entry->set("is_leaf_node",true);
entry->set("first",list->count()==0);