summaryrefslogtreecommitdiffstats
path: root/src/vhdldocgen.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2019-11-09 13:00:44 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2019-11-09 13:00:44 (GMT)
commit2702af59b09e68ad2db9eff7ef4ae5594deb15ae (patch)
treed2dbdb0d562b87d1162a4df707b48bf026f5b085 /src/vhdldocgen.cpp
parentaa33a2a657b70e61208c07d9861d0f721e8e68b2 (diff)
downloadDoxygen-2702af59b09e68ad2db9eff7ef4ae5594deb15ae.zip
Doxygen-2702af59b09e68ad2db9eff7ef4ae5594deb15ae.tar.gz
Doxygen-2702af59b09e68ad2db9eff7ef4ae5594deb15ae.tar.bz2
Fixed use of uninitialized data in VHDL generator
Diffstat (limited to 'src/vhdldocgen.cpp')
-rw-r--r--src/vhdldocgen.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/vhdldocgen.cpp b/src/vhdldocgen.cpp
index 3585230..90d4829 100644
--- a/src/vhdldocgen.cpp
+++ b/src/vhdldocgen.cpp
@@ -717,7 +717,7 @@ static QMap<ClassDef*,QList<ClassDef> > packages;
MemberDef* VhdlDocGen::findMember(const QCString& className, const QCString& memName)
{
- ClassDef* cd,*ecd;
+ ClassDef* cd,*ecd=0;
MemberDef *mdef=0;
cd=getClass(className);
@@ -793,9 +793,11 @@ MemberDef* VhdlDocGen::findMember(const QCString& className, const QCString& mem
if (!packages.contains(ecd)) VhdlDocGen::findAllPackages(ecd);
}
- QMap<ClassDef*,QList<ClassDef> >::Iterator cList=packages.find(ecd);
- if (cList.key()!=0)
- {
+ if (ecd)
+ {
+ QMap<ClassDef*,QList<ClassDef> >::Iterator cList=packages.find(ecd);
+ if (cList!=packages.end())
+ {
QList<ClassDef> mlist=cList.data();
for (uint j=0;j<mlist.count();j++)
{
@@ -804,7 +806,8 @@ MemberDef* VhdlDocGen::findMember(const QCString& className, const QCString& mem
mdef=VhdlDocGen::findMemberDef(mlist.at(j),memName,MemberListType_pubMethods);
if (mdef) return mdef;
}
- }
+ }
+ }
return 0;
}//findMember