summaryrefslogtreecommitdiffstats
path: root/src/memberdef.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/memberdef.cpp')
-rw-r--r--src/memberdef.cpp27
1 files changed, 15 insertions, 12 deletions
diff --git a/src/memberdef.cpp b/src/memberdef.cpp
index 662a8f3..5bf7e46 100644
--- a/src/memberdef.cpp
+++ b/src/memberdef.cpp
@@ -1538,21 +1538,24 @@ void MemberDef::generateXML(QTextStream &t,Definition *def)
else if (xmlType==enum_t) // enum
{
t << " <enumvaluelist>" << endl;
- MemberListIterator emli(*enumFields);
- MemberDef *emd;
- for (emli.toFirst();(emd=emli.current());++emli)
+ if (enumFields)
{
- t << " <enumvalue>" << endl;
- t << " <name>";
- writeXMLString(t,emd->name());
- t << "</name>" << endl;
- if (!emd->init.isEmpty())
+ MemberListIterator emli(*enumFields);
+ MemberDef *emd;
+ for (emli.toFirst();(emd=emli.current());++emli)
{
- t << " <initializer>";
- writeXMLString(t,emd->init);
- t << "</initializer>" << endl;
+ t << " <enumvalue>" << endl;
+ t << " <name>";
+ writeXMLString(t,emd->name());
+ t << "</name>" << endl;
+ if (!emd->init.isEmpty())
+ {
+ t << " <initializer>";
+ writeXMLString(t,emd->init);
+ t << "</initializer>" << endl;
+ }
+ t << " </enumvalue>" << endl;
}
- t << " </enumvalue>" << endl;
}
t << " </enumvaluelist>" << endl;
}