summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-02-21 13:30:53 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-02-21 15:30:25 +0000
commit7a7ecf164aebfff10b88cd3ce327ebff8c41af89 (patch)
treeafb64f52a4ac8a7a914f01bca43328deaee2e154 /toolkit
parent0e0ac7cc65bbf48d8bbb311108b3602a030b48d6 (diff)
coverity#705963 Dereference before null check
Change-Id: I6371ef5e838d1e66ea9aeba75f554eea93426139
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/source/helper/unowrapper.cxx23
1 files changed, 10 insertions, 13 deletions
diff --git a/toolkit/source/helper/unowrapper.cxx b/toolkit/source/helper/unowrapper.cxx
index 9b74a3ebc655..38b016e9fa64 100644
--- a/toolkit/source/helper/unowrapper.cxx
+++ b/toolkit/source/helper/unowrapper.cxx
@@ -275,23 +275,20 @@ void UnoWrapper::WindowDestroyed( Window* pWindow )
// #i42462#/#116855# no, don't loop: Instead, just ensure that all our top-window-children
// are disposed, too (which should also be a valid fix for #102132#, but doesn't have the extreme
// performance penalties)
- if ( pWindow )
+ Window* pTopWindowChild = pWindow->GetWindow( WINDOW_FIRSTTOPWINDOWCHILD );
+ while ( pTopWindowChild )
{
- Window* pTopWindowChild = pWindow->GetWindow( WINDOW_FIRSTTOPWINDOWCHILD );
- while ( pTopWindowChild )
- {
- OSL_ENSURE( pTopWindowChild->GetParent() == pWindow,
- "UnoWrapper::WindowDestroyed: inconsistency in the SystemWindow relationship!" );
+ OSL_ENSURE( pTopWindowChild->GetParent() == pWindow,
+ "UnoWrapper::WindowDestroyed: inconsistency in the SystemWindow relationship!" );
- Window* pNextTopChild = pTopWindowChild->GetWindow( WINDOW_NEXTTOPWINDOWSIBLING );
+ Window* pNextTopChild = pTopWindowChild->GetWindow( WINDOW_NEXTTOPWINDOWSIBLING );
- //the window still could be on the stack, so we have to
- // use lazy delete ( it will automatically
- // disconnect from the currently destroyed parent window )
- pTopWindowChild->doLazyDelete();
+ //the window still could be on the stack, so we have to
+ // use lazy delete ( it will automatically
+ // disconnect from the currently destroyed parent window )
+ pTopWindowChild->doLazyDelete();
- pTopWindowChild = pNextTopChild;
- }
+ pTopWindowChild = pNextTopChild;
}
}