[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - sfx2/source
Julien Nabet (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jul 15 08:44:01 UTC 2021
sfx2/source/commandpopup/CommandPopup.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit e0dc2d8ac04b123cb0f43e3595d61e2198bf89a0
Author: Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Wed Jul 14 11:39:07 2021 +0200
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Thu Jul 15 10:43:27 2021 +0200
tdf#143342: fix crash when using "Search Command" feature
Error: attempt to subscript container with out-of-bounds index -1, but
container only holds 0 elements.
Objects involved in the operation:
sequence "this" @ 0x0x85b1d50 {
type = std::__debug::vector<CurrentEntry, std::allocator<CurrentEntry> >;
}
4 0x00007fe75d569357 in CommandListBox::RowActivated(weld::TreeView&) (this=0x85b1d30) at sfx2/source/commandpopup/CommandPopup.cxx:202
5 0x00007fe75d569649 in CommandListBox::TreeViewKeyPress(KeyEvent const&) (this=0x85b1d30, rKeyEvent=...) at sfx2/source/commandpopup/CommandPopup.cxx:222
6 0x00007fe75d569170 in CommandListBox::LinkStubTreeViewKeyPress(void*, KeyEvent const&) (instance=0x85b1d30, data=...) at sfx2/source/commandpopup/CommandPopup.cxx:209
Change-Id: I62923ce106da62e3d7d7572536f5e065773683ea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118891
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
(cherry picked from commit 32b820b7ac299de66965857a86feed895f91c4d5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118912
Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
diff --git a/sfx2/source/commandpopup/CommandPopup.cxx b/sfx2/source/commandpopup/CommandPopup.cxx
index 5500f8913673..518e73a132b1 100644
--- a/sfx2/source/commandpopup/CommandPopup.cxx
+++ b/sfx2/source/commandpopup/CommandPopup.cxx
@@ -197,7 +197,7 @@ IMPL_LINK_NOARG(CommandListBox, RowActivated, weld::TreeView&, bool)
{
OUString aCommandURL;
int nSelected = mpCommandTreeView->get_selected_index();
- if (nSelected < int(maCommandList.size()))
+ if (nSelected != -1 && nSelected < int(maCommandList.size()))
{
auto const& rCurrent = maCommandList[nSelected];
aCommandURL = rCurrent.m_aCommandURL;
More information about the Libreoffice-commits
mailing list