diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-10-23 14:18:25 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-10-23 14:54:52 +0100 |
commit | cf33ce966752a9e222a53705604c4bf87525a444 (patch) | |
tree | 5c4db98d566866fa627f241c739795e80316725c | |
parent | 5be04f59c9d9505a03239347de7ab4c0fdb452e7 (diff) |
coverity#736876 Negative array index read
Change-Id: I5e0f2e4633286b320abfb6735232b57aedd3a5b3
-rw-r--r-- | framework/source/layoutmanager/toolbarlayoutmanager.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx index 1c3dd0541ab5..0811d5fea899 100644 --- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx @@ -2243,14 +2243,13 @@ void ToolbarLayoutManager::implts_getDockingAreaElementInfoOnSingleRowCol( ui::D void ToolbarLayoutManager::implts_findNextDockingPos( ui::DockingArea DockingArea, const ::Size& aUIElementSize, awt::Point& rVirtualPos, ::Point& rPixelPos ) { SolarMutexClearableGuard aReadLock; + if (( DockingArea < ui::DockingArea_DOCKINGAREA_TOP ) || ( DockingArea > ui::DockingArea_DOCKINGAREA_RIGHT )) + DockingArea = ui::DockingArea_DOCKINGAREA_TOP; uno::Reference< awt::XWindow > xDockingWindow( m_xDockAreaWindows[DockingArea] ); ::Size aDockingWinSize; vcl::Window* pDockingWindow( 0 ); aReadLock.clear(); - if (( DockingArea < ui::DockingArea_DOCKINGAREA_TOP ) || ( DockingArea > ui::DockingArea_DOCKINGAREA_RIGHT )) - DockingArea = ui::DockingArea_DOCKINGAREA_TOP; - { // Retrieve output size from container Window SolarMutexGuard aGuard; |