summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2019-09-29 14:09:26 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-09-29 17:06:24 +0200
commit725b51044b955946c6528ca08a8a36dc44f09cd8 (patch)
tree1613f7e92cfbb4177e8b66532a8036385077f774 /extensions
parentMove Rectangle,Point,Size serialization to GenericTypeSerializer (diff)
downloadcore-725b51044b955946c6528ca08a8a36dc44f09cd8.tar.gz
core-725b51044b955946c6528ca08a8a36dc44f09cd8.zip
tdf#127863: fix crash when trying to edit assigned macro to a button
see bt here: https://bugs.documentfoundation.org/attachment.cgi?id=154638 Let's avoid iterator use here to avoid invalid iterator in debug mode + slight formatting Change-Id: I40b42201ad299aee33275b2c961e1e0233f86ad4 Reviewed-on: https://gerrit.libreoffice.org/79812 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/propctrlr/eventhandler.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/extensions/source/propctrlr/eventhandler.cxx b/extensions/source/propctrlr/eventhandler.cxx
index 83bbef32496b..3a9a6d147cc5 100644
--- a/extensions/source/propctrlr/eventhandler.cxx
+++ b/extensions/source/propctrlr/eventhandler.cxx
@@ -303,7 +303,7 @@ namespace pcr
{
private:
typedef std::unordered_map< OUString, ScriptEventDescriptor > EventMap;
- typedef std::map< EventId, EventMap::iterator > EventMapIndexAccess;
+ typedef std::map< EventId, OUString > EventMapIndexAccess;
EventMap m_aEventNameAccess;
EventMapIndexAccess m_aEventIndexAccess;
@@ -349,7 +349,7 @@ namespace pcr
std::pair< EventMap::iterator, bool > insertionResult =
m_aEventNameAccess.emplace( _rEventName, _rScriptEvent );
OSL_ENSURE( insertionResult.second, "EventHolder::addEvent: there already was a MacroURL for this event!" );
- m_aEventIndexAccess[ _nId ] = insertionResult.first;
+ m_aEventIndexAccess[ _nId ] = _rEventName;
}
ScriptEventDescriptor EventHolder::getNormalizedDescriptorByName( const OUString& _rEventName ) const
@@ -409,7 +409,7 @@ namespace pcr
// appear in the property browser UI.
for (auto const& elem : m_aEventIndexAccess)
{
- *pReturn = elem.second->first;
+ *pReturn = elem.second;
++pReturn;
}
return aReturn;