vcl/unx/gtk3/gtk3gtksalmenu.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit 9700c6ecc6a488247b5c504577d3599ac54d497e Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Dec 9 09:36:00 2020 +0000 Commit: Michael Stahl <michael.st...@cib.de> CommitDate: Thu Dec 10 15:35:03 2020 +0100 unref pSubMenuModel at the end of the scope Change-Id: Ia427c736f989de38f30c455aeed0f43811a456b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107475 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@cib.de> diff --git a/vcl/unx/gtk3/gtk3gtksalmenu.cxx b/vcl/unx/gtk3/gtk3gtksalmenu.cxx index 262187f16658..6e47e4eae91a 100644 --- a/vcl/unx/gtk3/gtk3gtksalmenu.cxx +++ b/vcl/unx/gtk3/gtk3gtksalmenu.cxx @@ -325,7 +325,7 @@ void GtkSalMenu::ImplUpdate(bool bRecurse, bool bRemoveDisabledEntries) pSubMenuModel = g_lo_menu_get_submenu_from_item_in_section( pLOMenu, nSection, nItemPos ); } - g_object_unref( pSubMenuModel ); + assert(pSubMenuModel); if (bRecurse || bNonMenuChangedToMenu) { @@ -334,6 +334,8 @@ void GtkSalMenu::ImplUpdate(bool bRecurse, bool bRemoveDisabledEntries) pSubmenu->SetActionGroup( G_ACTION_GROUP( pActionGroup ) ); pSubmenu->ImplUpdate(true, bRemoveDisabledEntries); } + + g_object_unref( pSubMenuModel ); } g_free( aNativeCommand ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits