[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - vcl/aqua
Caolán McNamara
caolanm at redhat.com
Wed Apr 10 23:26:35 PDT 2013
vcl/aqua/source/gdi/salvd.cxx | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
New commits:
commit 1061de77bb8927defb372df31899fddc7ace237d
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jul 11 13:13:24 2012 +0000
Resolves: fdo#62287 avoid a crash on OSX on reusing a dead AquaSalFrame
part 1 of 3:
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)
(cherry picked from commit 5333d295225e4cf961e03ea8bf2fd1e2f9d168bc)
part 2 of 3:
Related: #i120237# cache the updated frame reference in AquaSalGraphics
(cherry picked from commit 6e4214e604f8aa86b08a7fbe315a80d7751ffc2d)
(cherry picked from commit ef4b5aad82da7133e89e37e3e04791398d6fb3a6)
part 3 of 3:
Related: fdo#62287 make it impossible to use a dead AquaSalFrame
(cherry picked from commit 43a23fb3f8f1ffa4937658dd9393d23533b84d18)
d10d49737ba773e95a3198997e25fbfd98708f65
e56a41e901ea26d5ea946260bdf25a903185be99
Change-Id: I1a813f128ad16e6eb840b22fbd14af49b34e11d0
Reviewed-on: https://gerrit.libreoffice.org/3295
Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
Tested-by: Fridrich Strba <fridrich at documentfoundation.org>
diff --git a/vcl/aqua/source/gdi/salvd.cxx b/vcl/aqua/source/gdi/salvd.cxx
index 9696b9a..b129f06 100644
--- a/vcl/aqua/source/gdi/salvd.cxx
+++ b/vcl/aqua/source/gdi/salvd.cxx
@@ -184,8 +184,22 @@ sal_Bool AquaSalVirtualDevice::SetSize( long nDX, long nDY )
{
// default to a NSView target context
AquaSalFrame* pSalFrame = mpGraphics->getGraphicsFrame();
- if( !pSalFrame && !GetSalData()->maFrames.empty() )
- pSalFrame = *GetSalData()->maFrames.begin();
+ if( !pSalFrame || !AquaSalFrame::isAlive( pSalFrame ))
+ {
+ if( !GetSalData()->maFrames.empty() )
+ {
+ // get the first matching frame
+ pSalFrame = *GetSalData()->maFrames.begin();
+ }
+ 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 )
{
// #i91990#
More information about the Libreoffice-commits
mailing list