vcl/aqua/source/gdi/salvd.cxx |   18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

New commits:
commit 43a23fb3f8f1ffa4937658dd9393d23533b84d18
Author: Caolán McNamara <caol...@redhat.com>
Date:   Tue Apr 9 20:17:39 2013 +0100

    Related: fdo#62287 make it impossible to use a dead AquaSalFrame
    
    Change-Id: Ie56a41e901ea26d5ea946260bdf25a903185be99

diff --git a/vcl/aqua/source/gdi/salvd.cxx b/vcl/aqua/source/gdi/salvd.cxx
index e4d5df3..3170dbe 100644
--- a/vcl/aqua/source/gdi/salvd.cxx
+++ b/vcl/aqua/source/gdi/salvd.cxx
@@ -190,9 +190,15 @@ sal_Bool AquaSalVirtualDevice::SetSize( long nDX, long nDY 
)
             {
                 // get the first matching frame
                 pSalFrame = *GetSalData()->maFrames.begin();
-                // update the frame reference
-                mpGraphics->setGraphicsFrame( pSalFrame );
             }
+            else
+            {
+                // ensure we don't reuse a dead AquaSalFrame on the very
+                // unlikely case of no other frame to use
+                pSalFrame = NULL;
+            }
+            // update the frame reference
+            mpGraphics->setGraphicsFrame( pSalFrame );
         }
         if( pSalFrame )
         {
commit ef4b5aad82da7133e89e37e3e04791398d6fb3a6
Author: Herbert Dürr <h...@apache.org>
Date:   Wed Jul 11 14:01:20 2012 +0000

    Related: #i120237# cache the updated frame reference in AquaSalGraphics
    
    (cherry picked from commit 6e4214e604f8aa86b08a7fbe315a80d7751ffc2d)
    
    Change-Id: Id10d49737ba773e95a3198997e25fbfd98708f65

diff --git a/vcl/aqua/source/gdi/salvd.cxx b/vcl/aqua/source/gdi/salvd.cxx
index 109b3fb..e4d5df3 100644
--- a/vcl/aqua/source/gdi/salvd.cxx
+++ b/vcl/aqua/source/gdi/salvd.cxx
@@ -182,11 +182,18 @@ sal_Bool AquaSalVirtualDevice::SetSize( long nDX, long 
nDY )
     }
     else
     {
-        // default to a NSView target context, any will do
+        // default to a NSView target context
         AquaSalFrame* pSalFrame = mpGraphics->getGraphicsFrame();
         if( !pSalFrame || !AquaSalFrame::isAlive( pSalFrame ))
+        {
             if( !GetSalData()->maFrames.empty() )
+            {
+                // get the first matching frame
                 pSalFrame = *GetSalData()->maFrames.begin();
+                // update the frame reference
+                mpGraphics->setGraphicsFrame( pSalFrame );
+            }
+        }
         if( pSalFrame )
         {
             // #i91990#
commit 5333d295225e4cf961e03ea8bf2fd1e2f9d168bc
Author: Herbert Dürr <h...@apache.org>
Date:   Wed Jul 11 13:13:24 2012 +0000

    Resolves: #i120237# workaround a crash on OSX...
    
    when a VirtualDevice is reused that was created for a now dead window
    
    regression was introduced by the changes for #i116758#
    
    Patch-By: Herbert Duerr
    Suggested-By: Herbert Duerr
    Found-By: Herbert Duerr
    (cherry picked from commit 6550c7c0595670c10e340e2c7b41be7e128af40a)
    
    Change-Id: I1a813f128ad16e6eb840b22fbd14af49b34e11d0

diff --git a/vcl/aqua/source/gdi/salvd.cxx b/vcl/aqua/source/gdi/salvd.cxx
index 36d9c7c..109b3fb 100644
--- a/vcl/aqua/source/gdi/salvd.cxx
+++ b/vcl/aqua/source/gdi/salvd.cxx
@@ -182,10 +182,11 @@ sal_Bool AquaSalVirtualDevice::SetSize( long nDX, long 
nDY )
     }
     else
     {
-        // default to a NSView target context
+        // default to a NSView target context, any will do
         AquaSalFrame* pSalFrame = mpGraphics->getGraphicsFrame();
-        if( !pSalFrame && !GetSalData()->maFrames.empty() )
-            pSalFrame = *GetSalData()->maFrames.begin();
+        if( !pSalFrame || !AquaSalFrame::isAlive( pSalFrame ))
+            if( !GetSalData()->maFrames.empty() )
+                pSalFrame = *GetSalData()->maFrames.begin();
         if( pSalFrame )
         {
             // #i91990#
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to