vcl/unx/gtk3/gtk3gtksalmenu.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit d1a0360ea90991ec27f503ee655f76faccb081fa Author: Caolán McNamara <[email protected]> AuthorDate: Wed Dec 9 09:36:00 2020 +0000 Commit: Caolán McNamara <[email protected]> CommitDate: Wed Dec 9 13:01:20 2020 +0100 unref pSubMenuModel at the end of the scope Change-Id: Ia427c736f989de38f30c455aeed0f43811a456b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107458 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> diff --git a/vcl/unx/gtk3/gtk3gtksalmenu.cxx b/vcl/unx/gtk3/gtk3gtksalmenu.cxx index bd15de7de848..f78bbab0081f 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 [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
