diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-04-09 20:17:39 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-04-09 20:17:39 +0100 |
commit | 43a23fb3f8f1ffa4937658dd9393d23533b84d18 (patch) | |
tree | 40b0cafa926722c9d44a17e6199006a2bdc82cb9 /vcl/aqua/source/gdi/salvd.cxx | |
parent | ef4b5aad82da7133e89e37e3e04791398d6fb3a6 (diff) |
Related: fdo#62287 make it impossible to use a dead AquaSalFrame
Change-Id: Ie56a41e901ea26d5ea946260bdf25a903185be99
Diffstat (limited to 'vcl/aqua/source/gdi/salvd.cxx')
-rw-r--r-- | vcl/aqua/source/gdi/salvd.cxx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/vcl/aqua/source/gdi/salvd.cxx b/vcl/aqua/source/gdi/salvd.cxx index e4d5df30fd8d..3170dbe2e7b4 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 ) { |