diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-05-27 15:34:06 +0200 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2018-05-27 15:34:06 +0200 |
commit | f0a5642def9d402f89f2a819f9f8cc6eb78da3fd (patch) | |
tree | 3112ee804c8f94ed5f6c534571ea7f71c81e8976 | |
parent | bc7813272754f95f3705eac4f7726c63c646f985 (diff) |
Fix CID#982602 to CID#982608 using invalid iterator
Change-Id: Ie254ff9c653b88be45680e547759b1ae58b4c0c8
-rw-r--r-- | hwpfilter/source/hwpfile.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/hwpfilter/source/hwpfile.cxx b/hwpfilter/source/hwpfile.cxx index 0082693f7b16..6f4cd6cfc44c 100644 --- a/hwpfilter/source/hwpfile.cxx +++ b/hwpfilter/source/hwpfile.cxx @@ -399,7 +399,7 @@ HyperText *HWPFile::GetHyperText() } currenthyper++; - return *it; + return it != hyperlist.end() ? *it : NULL; } EmPicture *HWPFile::GetEmPicture(Picture * pic) @@ -455,7 +455,7 @@ ParaShape *HWPFile::getParaShape(int index) break; } - return *it; + return it != pslist.end() ? *it : NULL; } @@ -468,7 +468,7 @@ CharShape *HWPFile::getCharShape(int index) break; } - return *it; + return it != cslist.end() ? *it : 0; } @@ -481,7 +481,7 @@ FBoxStyle *HWPFile::getFBoxStyle(int index) break; } - return *it; + return it != fbslist.end() ? *it : 0; } DateCode *HWPFile::getDateCode(int index) @@ -505,7 +505,7 @@ HeaderFooter *HWPFile::getHeaderFooter(int index) break; } - return *it; + return it != headerfooters.end() ? *it : NULL; } ShowPageNum *HWPFile::getPageNumber(int index) @@ -517,7 +517,7 @@ ShowPageNum *HWPFile::getPageNumber(int index) break; } - return *it; + return it != pagenumbers.end() ? *it : NULL; } @@ -530,7 +530,7 @@ Table *HWPFile::getTable(int index) break; } - return *it; + return it != tables.end() ? *it : NULL; } void HWPFile::AddParaShape(ParaShape * pshape) |