diff options
-rw-r--r-- | hwpfilter/source/hwpfile.cxx | 1 | ||||
-rw-r--r-- | hwpfilter/source/hwpfile.h | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/hwpfilter/source/hwpfile.cxx b/hwpfilter/source/hwpfile.cxx index 0aa1e9541af0..69386d7a846a 100644 --- a/hwpfilter/source/hwpfile.cxx +++ b/hwpfilter/source/hwpfile.cxx @@ -273,6 +273,7 @@ bool HWPFile::ReadParaList(std::list < HWPPara* > &aplist, unsigned char flag) aplist.push_back(spNode.release()); spNode.reset( new HWPPara ); } + pfailedlist.push_back(std::move(spNode)); return true; } diff --git a/hwpfilter/source/hwpfile.h b/hwpfilter/source/hwpfile.h index c98f90c82fe2..6336e36d97c3 100644 --- a/hwpfilter/source/hwpfile.h +++ b/hwpfilter/source/hwpfile.h @@ -276,6 +276,10 @@ class DLLEXPORT HWPFile std::list<ColumnInfo*> columnlist; // paragraph linked list std::list<HWPPara*> plist; + // keep paragraph's that failed to load until + // import is complete to avoid dangling references + // elsewhere + std::vector<std::unique_ptr<HWPPara>> pfailedlist; // floating box linked list std::list<FBox*> blist; // embedded picture list(tag datas) |