From 1ddf5b0ecb68333e00df72a9e367b709ff664661 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 27 Jan 2017 14:56:47 +0000 Subject: 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 --- vcl/source/gdi/impgraph.cxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'vcl/source') 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; } } -- cgit