[Libreoffice-commits] core.git: 2 commits - connectivity/source vcl/unx
Michael Stahl
mstahl at redhat.com
Wed Apr 13 16:43:57 UTC 2016
connectivity/source/drivers/file/fcode.cxx | 2 +-
connectivity/source/drivers/file/fcomp.cxx | 4 ++--
vcl/unx/gtk/gloactiongroup.cxx | 13 +++++++++----
3 files changed, 12 insertions(+), 7 deletions(-)
New commits:
commit 9a31442171cf8bd79574c318d91ef220ee7389bb
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
diff --git a/vcl/unx/gtk/gloactiongroup.cxx b/vcl/unx/gtk/gloactiongroup.cxx
index 110e0dc..f7b7bb0 100644
--- a/vcl/unx/gtk/gloactiongroup.cxx
+++ b/vcl/unx/gtk/gloactiongroup.cxx
@@ -153,6 +153,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)
@@ -160,10 +169,6 @@ g_lo_action_group_query_action (GActionGroup *group,
if (enabled)
{
- GtkSalFrame* pFrame = lo_group->priv->frame;
- if (pFrame) {
- pFrame->EnsureDbusMenuSynced();
- }
*enabled = action->enabled;
}
commit 49d320c6202a569f996c27fd824239f5f1f8a036
Author: Michael Stahl <mstahl at redhat.com>
Date: Wed Apr 13 18:18:11 2016 +0200
tdf#97853 connectivity: fix inverted condition
Also in 2 places IS_TYPE was converted to dynamic_cast instead of a
typeid check; use typeid there too, just for consistency.
(regression from ac9671f94800b647f82b12e718968311a025e87e)
Change-Id: I0df47a845eff660c791304c22c97704589ab999f
diff --git a/connectivity/source/drivers/file/fcode.cxx b/connectivity/source/drivers/file/fcode.cxx
index f71502c..a536d0c 100644
--- a/connectivity/source/drivers/file/fcode.cxx
+++ b/connectivity/source/drivers/file/fcode.cxx
@@ -366,7 +366,7 @@ void ONthOperator::Exec(OCodeStack& rCodeStack)
::std::vector<OOperand*>::const_iterator aEnd = aOperands.end();
for (; aIter != aEnd; ++aIter)
{
- if (typeid(OOperandResult) != typeid(*(*aIter)))
+ if (typeid(OOperandResult) == typeid(*(*aIter)))
delete *aIter;
}
}
diff --git a/connectivity/source/drivers/file/fcomp.cxx b/connectivity/source/drivers/file/fcomp.cxx
index 4133b4c..8a4339f 100644
--- a/connectivity/source/drivers/file/fcomp.cxx
+++ b/connectivity/source/drivers/file/fcomp.cxx
@@ -567,7 +567,7 @@ bool OPredicateInterpreter::evaluate(OCodeList& rCodeList)
DBG_ASSERT(pOperand, "StackFehler");
bResult = pOperand->isValid();
- if (dynamic_cast<const OOperandResult* >(pOperand) != nullptr)
+ if (typeid(OOperandResult) == typeid(*pOperand))
delete pOperand;
return bResult;
}
@@ -594,7 +594,7 @@ void OPredicateInterpreter::evaluateSelection(OCodeList& rCodeList,ORowSetValueD
DBG_ASSERT(pOperand, "StackFehler");
(*_rVal) = pOperand->getValue();
- if (dynamic_cast<const OOperandResult* >(pOperand) != nullptr)
+ if (typeid(OOperandResult) == typeid(*pOperand))
delete pOperand;
}
More information about the Libreoffice-commits
mailing list