[Libreoffice-commits] core.git: vcl/source

Caolán McNamara caolanm at redhat.com
Fri Jan 27 15:01:59 UTC 2017


 vcl/source/gdi/impgraph.cxx |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 1ddf5b0ecb68333e00df72a9e367b709ff664661
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jan 27 14:56:47 2017 +0000

    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

diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index 8cc7478..59d4b38 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;
         }
     }
 


More information about the Libreoffice-commits mailing list