sfx2/source/control/thumbnailview.cxx | 6 ++++++ 1 file changed, 6 insertions(+)
New commits: commit 23cf7f503e2730e56565476cef1f36ed2080c660 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Sat Dec 14 21:40:30 2024 +0000 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Wed Dec 18 11:28:08 2024 +0100 cid#1606564 silence Overflowed constant Change-Id: I6a4e36e9905278673577b543b27c50bc7988cc18 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178707 Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> Tested-by: Jenkins diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx index 7c60a398928c..e1fd5ac139e8 100644 --- a/sfx2/source/control/thumbnailview.cxx +++ b/sfx2/source/control/thumbnailview.cxx @@ -708,14 +708,20 @@ bool ThumbnailView::KeyInput( const KeyEvent& rKEvt ) aRange = std::make_pair(nLastPos,nNextPos-1); } else + { + assert(nLastPos > 0); aRange = std::make_pair(nNextPos,nLastPos-1); + } } else if (nLastPos == nSelPos) { if (nNextPos > nLastPos) aRange = std::make_pair(nLastPos+1,nNextPos); else + { + assert(nLastPos > 0); aRange = std::make_pair(nNextPos,nLastPos-1); + } } else {