Index: Source/core/page/EventHandler.cpp |
diff --git a/Source/core/page/EventHandler.cpp b/Source/core/page/EventHandler.cpp |
index 1a1b6d5f8102b02fcd7fdb6584124f711878e974..cf16660a6b045b4a2b1d4b08e4effbe9b3232974 100644 |
--- a/Source/core/page/EventHandler.cpp |
+++ b/Source/core/page/EventHandler.cpp |
@@ -3715,8 +3715,10 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event) |
// Ensure this target's touch list exists, even if it ends up empty, so it can always be passed to TouchEvent::Create below. |
TargetTouchesMap::iterator targetTouchesIterator = touchesByTarget.find(touchTarget.get()); |
- if (targetTouchesIterator == touchesByTarget.end()) |
- targetTouchesIterator = touchesByTarget.set(touchTarget.get(), TouchList::create()).iterator; |
+ if (targetTouchesIterator == touchesByTarget.end()) { |
+ touchesByTarget.set(touchTarget.get(), TouchList::create()); |
+ targetTouchesIterator = touchesByTarget.find(touchTarget.get()); |
+ } |
// touches and targetTouches should only contain information about touches still on the screen, so if this point is |
// released or cancelled it will only appear in the changedTouches list. |