summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-03-28 10:27:53 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-03-28 13:13:59 +0000
commit10787356d93c0a913f4f6cd65920c57b3ec3e701 (patch)
tree478262c5e2717451cfd29c68fd971aac121d350b /toolkit
parentf1fe85ec8df1f246e61e93795b82d93c1d90cdb6 (diff)
coverity#736157 Dereference null return value
Change-Id: Ibc6e17e4d916ae9e1664e8c9149a978072dae0ac
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/source/awt/vclxtabpagecontainer.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/toolkit/source/awt/vclxtabpagecontainer.cxx b/toolkit/source/awt/vclxtabpagecontainer.cxx
index ef571673a398..4b8766206964 100644
--- a/toolkit/source/awt/vclxtabpagecontainer.cxx
+++ b/toolkit/source/awt/vclxtabpagecontainer.cxx
@@ -60,12 +60,12 @@ void SAL_CALL VCLXTabPageContainer::draw( sal_Int32 nX, sal_Int32 nY ) throw(Run
if ( pTabControl )
{
TabPage *pTabPage = pTabControl->GetTabPage( sal::static_int_cast< sal_uInt16 >( pTabControl->GetCurPageId( ) ) );
- if ( pTabPage )
+ OutputDevice* pDev = VCLUnoHelper::GetOutputDevice( getGraphics() );
+ if (pTabPage && pDev)
{
::Point aPos( nX, nY );
::Size aSize = pTabPage->GetSizePixel();
- OutputDevice* pDev = VCLUnoHelper::GetOutputDevice( getGraphics() );
aPos = pDev->PixelToLogic( aPos );
aSize = pDev->PixelToLogic( aSize );