diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-02-09 16:00:06 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-02-09 17:13:40 +0000 |
commit | d9b5127b033e55fd7d634f0d5496d7185682677c (patch) | |
tree | fe8c34b059750cb1b4fb0202508aedca95b349ab /chart2/source | |
parent | 295869ce95c00a0e0b192ea6bf62753f91badaf2 (diff) |
coverity#1169824 Explicit null dereferenced
Change-Id: I5fe32e480d8cc372bccae25a0d180210e34075cf
Diffstat (limited to 'chart2/source')
-rw-r--r-- | chart2/source/view/main/DummyXShape.cxx | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/chart2/source/view/main/DummyXShape.cxx b/chart2/source/view/main/DummyXShape.cxx index 8eb97e37f94b..4ed9622617b5 100644 --- a/chart2/source/view/main/DummyXShape.cxx +++ b/chart2/source/view/main/DummyXShape.cxx @@ -1119,26 +1119,23 @@ bool DummyChart::initWindow() winData.pVisual = (void*)(vi->visual); pWindow.reset(new SystemChildWindow(mpWindow.get(), 0, &winData, sal_False)); pChildSysData = pWindow->GetSystemData(); - - if( !pChildSysData ) - return false; } + if (!pWindow || !pChildSysData) + return false; - if( pWindow ) - { - pWindow->SetMouseTransparent( sal_True ); - pWindow->SetParentClipMode( PARENTCLIPMODE_NOCLIP ); - pWindow->EnableEraseBackground( sal_False ); - pWindow->SetControlForeground(); - pWindow->SetControlBackground(); + pWindow->SetMouseTransparent( sal_True ); + pWindow->SetParentClipMode( PARENTCLIPMODE_NOCLIP ); + pWindow->EnableEraseBackground( sal_False ); + pWindow->SetControlForeground(); + pWindow->SetControlBackground(); + + GLWin.dpy = reinterpret_cast<Display*>(pChildSysData->pDisplay); + GLWin.win = pChildSysData->aWindow; + GLWin.vi = vi; + GLWin.GLXExtensions = glXQueryExtensionsString( GLWin.dpy, GLWin.screen ); + OSL_TRACE("available GLX extensions: %s", GLWin.GLXExtensions); - GLWin.dpy = reinterpret_cast<Display*>(pChildSysData->pDisplay); - GLWin.win = pChildSysData->aWindow; - GLWin.vi = vi; - GLWin.GLXExtensions = glXQueryExtensionsString( GLWin.dpy, GLWin.screen ); - OSL_TRACE("available GLX extensions: %s", GLWin.GLXExtensions); - } return true; } |