diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-01-25 21:28:20 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-01-25 21:28:20 +0000 |
commit | 784d069cc1d9f1d6e6a4e543a278376ab483d1eb (patch) | |
tree | 8c0fb71d6a54ec336ba71bc238da5c9fd36059a5 /vcl | |
parent | 6347df7af9a6c095da49c353aa8cc31914da8510 (diff) |
coverity#1266475 Dereference null return value
Change-Id: Ife68d6e6d837d1e4e1e1de3a82998866e5ef7e83
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/window/dlgctrl.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vcl/source/window/dlgctrl.cxx b/vcl/source/window/dlgctrl.cxx index a7d6e7ad9f82..2b63b3f3920d 100644 --- a/vcl/source/window/dlgctrl.cxx +++ b/vcl/source/window/dlgctrl.cxx @@ -231,7 +231,7 @@ vcl::Window* Window::ImplGetDlgWindow( sal_uInt16 nIndex, sal_uInt16 nType, pWindow = ImplGetChildWindow( this, nFormStart, i, true ); } - if ( i <= nFormEnd ) + if (i <= nFormEnd && pWindow) { // carry the 2nd index, in case all controls are disabled sal_uInt16 nStartIndex2 = i; @@ -252,9 +252,9 @@ vcl::Window* Window::ImplGetDlgWindow( sal_uInt16 nIndex, sal_uInt16 nType, else pWindow = ImplGetNextWindow( this, i, i, true ); } - while ( (i != nStartIndex) && (i != nStartIndex2) ); + while (i != nStartIndex && i != nStartIndex2 && pWindow); - if ( (i == nStartIndex2) && + if ( (i == nStartIndex2) && pWindow && (!(pWindow->GetStyle() & WB_TABSTOP) || !isEnabledInLayout(pWindow)) ) i = nStartIndex; } |