summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-01-27 14:56:47 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-01-27 15:01:21 +0000
commit1ddf5b0ecb68333e00df72a9e367b709ff664661 (patch)
tree79a58d19a02df38afba2855f54d0f12ac235bd13 /vcl/source
parent4d092cba7993b283107eea193e8aaefdf7604952 (diff)
ImplClear sets mbSwapOut false, so mbSwapOut is actually always false here
i.e. failure to swap in does not mean that mbSwapOut is true afterwards, and mpSwapFile is discarded. It means the whole thing is thrown away. Change-Id: I73704866d77078c73d053047a7d2ef6499a3e69d
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/gdi/impgraph.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index 8cc74781423b..59d4b38ec7f8 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -1267,10 +1267,12 @@ bool ImpGraphic::ImplSwapIn( SvStream* xIStm )
bRet = ImplReadEmbedded( *xIStm );
mbSwapUnderway = false;
- if( !bRet )
+ if (!bRet)
+ {
+ //throw away swapfile, etc.
ImplClear();
- else
- mbSwapOut = false;
+ }
+ mbSwapOut = false;
}
}