summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-08-02 22:37:33 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-08-03 10:35:38 +0100
commit156c5bd4b04402f8dd724da6c8f984c4d63e4171 (patch)
treedf92677790616bffeda10e11163961871c985c2b
parent88091ae83ef1bb2e710bbb76efa351cc92276857 (diff)
Related: #i38880# crash in new field code
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 9624079439..2afe16b04c 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -2712,10 +2712,13 @@ void SwWW8ImplReader::Read_Obj(sal_uInt16 , const sal_uInt8* pData, short nLen)
if( bObj && nPicLocFc && bEmbeddObj )
{
- if ( maFieldStack.back().mnFieldId == 56 ) {
+ if (!maFieldStack.empty() && maFieldStack.back().mnFieldId == 56)
+ {
// For LINK fields, store the nObjLocFc value in the field entry
maFieldStack.back().mnObjLocFc = nPicLocFc;
- } else {
+ }
+ else
+ {
nObjLocFc = nPicLocFc;
}
}