diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-06-04 16:20:18 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-06-04 16:22:59 +0100 |
commit | 0ae00643fc87ca30ddf788df9f31cec8dae4e544 (patch) | |
tree | 38289a30b3dc47c67f1bc083d0f56b1e9f26baf8 | |
parent | 84c9d54eb3c007066908794a1443dca6670a3922 (diff) |
GetWin seen as NULL sometimes
Change-Id: I08974e3a8a3f34e2c1f0843c536e72ca0eb4b29d
(cherry picked from commit 4bf829ba2a4e02188b41064759d17eaf57f22dfe)
-rw-r--r-- | sw/source/core/access/accfrmobj.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sw/source/core/access/accfrmobj.cxx b/sw/source/core/access/accfrmobj.cxx index ce9d3d875e3e..a1bd0bfeb57c 100644 --- a/sw/source/core/access/accfrmobj.cxx +++ b/sw/source/core/access/accfrmobj.cxx @@ -262,10 +262,14 @@ SwRect SwAccessibleChild::GetBox( const SwAccessibleMap& rAccMap ) const } else if ( mpWindow ) { - aBox = SwRect( rAccMap.GetShell()->GetWin()->PixelToLogic( - Rectangle( mpWindow->GetPosPixel(), - mpWindow->GetSizePixel() ) ) ); -} + vcl::Window *pWin = rAccMap.GetShell()->GetWin(); + if (pWin) + { + aBox = SwRect( pWin->PixelToLogic( + Rectangle( mpWindow->GetPosPixel(), + mpWindow->GetSizePixel() ) ) ); + } + } return aBox; } |