[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - vcl/unx
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Wed Dec 9 12:03:21 UTC 2020
vcl/unx/gtk3/gtk3gtksalmenu.cxx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit a0f5e32443296e7404b7646f3fc7a79ab1328399
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Dec 9 09:36:00 2020 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Dec 9 13:02:43 2020 +0100
unref pSubMenuModel at the end of the scope
Change-Id: Ia427c736f989de38f30c455aeed0f43811a456b5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107474
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
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 );
More information about the Libreoffice-commits
mailing list