From 5333d295225e4cf961e03ea8bf2fd1e2f9d168bc Mon Sep 17 00:00:00 2001 From: Herbert Dürr Date: Wed, 11 Jul 2012 13:13:24 +0000 Subject: 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 --- vcl/aqua/source/gdi/salvd.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/vcl/aqua/source/gdi/salvd.cxx b/vcl/aqua/source/gdi/salvd.cxx index 36d9c7c26139..109b3fb94d0f 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# -- cgit