[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - vcl/unx
Michael Stahl
mstahl at redhat.com
Thu Apr 14 13:51:49 UTC 2016
vcl/unx/gtk/gloactiongroup.cxx | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
New commits:
commit ab951b113d66e4ba8dc0ba15a801d43dd377ddf9
Author: Michael Stahl <mstahl at redhat.com>
Date: Wed Apr 13 18:22:49 2016 +0200
vcl: fix valgrind warning in g_lo_action_group_query_action
Change-Id: I0755254d4d6d24689d4f5b39c3a6c9a29ae53b99
(cherry picked from commit 9a31442171cf8bd79574c318d91ef220ee7389bb)
Reviewed-on: https://gerrit.libreoffice.org/24063
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/vcl/unx/gtk/gloactiongroup.cxx b/vcl/unx/gtk/gloactiongroup.cxx
index 8385388..7d846eb 100644
--- a/vcl/unx/gtk/gloactiongroup.cxx
+++ b/vcl/unx/gtk/gloactiongroup.cxx
@@ -152,6 +152,15 @@ g_lo_action_group_query_action (GActionGroup *group,
GLOActionGroup *lo_group = G_LO_ACTION_GROUP (group);
GLOAction* action;
+ if (enabled)
+ {
+ GtkSalFrame* pFrame = lo_group->priv->frame;
+ if (pFrame) {
+ pFrame->EnsureDbusMenuSynced();
+ }
+ }
+
+ // note: EnsureDbusMenuSynced could have deleted the action!
action = G_LO_ACTION (g_hash_table_lookup (lo_group->priv->table, action_name));
if (action == nullptr)
@@ -159,10 +168,6 @@ g_lo_action_group_query_action (GActionGroup *group,
if (enabled)
{
- GtkSalFrame* pFrame = lo_group->priv->frame;
- if (pFrame) {
- pFrame->EnsureDbusMenuSynced();
- }
*enabled = action->enabled;
}
More information about the Libreoffice-commits
mailing list