diff options
Diffstat (limited to 'src/marshal.cpp')
-rw-r--r-- | src/marshal.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/marshal.cpp b/src/marshal.cpp index 1c7d54e..c68718a 100644 --- a/src/marshal.cpp +++ b/src/marshal.cpp @@ -142,7 +142,6 @@ void marshalSectionInfoList(StorageIntf *s, QList<SectionInfo> *anchors) marshalQCString(s,si->fileName); marshalInt(s,si->lineNr); marshalInt(s,si->level); - delete Doxygen::sectionDict->take(si->label); // this dict owns the anchor objects } anchors->clear(); } @@ -564,12 +563,18 @@ QList<SectionInfo> *unmarshalSectionInfoList(StorageIntf *s) QCString fileName = unmarshalQCString(s); int lineNr = unmarshalInt(s); int level = unmarshalInt(s); - if (Doxygen::sectionDict->find(label)==0) + SectionInfo *si = Doxygen::sectionDict->find(label); + if (si==0) // This should actually never be true since all anchors should be in sectionDict. + // Could still optimize the marshaling routine by only storing label. { SectionInfo *si = new SectionInfo(fileName,lineNr,label,title,type,level,ref); anchors->append(si); Doxygen::sectionDict->append(label,si); // this dict owns the anchor objects } + else + { + anchors->append(si); + } } return anchors; } |