summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2013-02-18 01:52:15 -0600
committerNorbert Thiebaud <nthiebaud@gmail.com>2013-02-22 07:36:11 +0000
commitd1ccb1eea871ca4064693b58d2926d4939018614 (patch)
treed7155fa3937d470495a62729b154234214bcec18 /basctl
parentf0300c1ade9f336c68c8ad992d89443f48021283 (diff)
coverity#735665 Dereference after null check
Change-Id: I9d217789116602838dabbf93e81ab8d0467c5c7b Reviewed-on: https://gerrit.libreoffice.org/2217 Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/basicide/basides2.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/basctl/source/basicide/basides2.cxx b/basctl/source/basicide/basides2.cxx
index 3337f9f19994..e08fe951effc 100644
--- a/basctl/source/basicide/basides2.cxx
+++ b/basctl/source/basicide/basides2.cxx
@@ -213,10 +213,12 @@ ModulWindow* Shell::CreateBasWin( const ScriptDocument& rDocument, const OUStrin
}
pTabBar->InsertPage( (sal_uInt16)nKey, aModName );
pTabBar->Sort();
- pWin->GrabScrollBars( &aHScrollBar, &aVScrollBar );
- if ( !pCurWin )
- SetCurWindow( pWin, false, false );
-
+ if(pWin)
+ {
+ pWin->GrabScrollBars( &aHScrollBar, &aVScrollBar );
+ if ( !pCurWin )
+ SetCurWindow( pWin, false, false );
+ }
bCreatingWindow = false;
return pWin;
}