From b50da6f3a9109fc1d4468c15aa7d5c68773ec199 Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Mon, 4 Dec 2023 11:31:36 +0100 Subject: cid#1546275 Using invalid iterator and : cid#1546219 Using invalid iterator cid#1546088 Using invalid iterator cid#1546070 Using invalid iterator cid#1546061 Using invalid iterator cid#1546055 Using invalid iterator cid#1546049 Using invalid iterator Change-Id: I6f3a786852b5c262d60c3195e446a37967ed9b59 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160311 Tested-by: Jenkins Reviewed-by: Julien Nabet --- slideshow/source/engine/box2dtools.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'slideshow') diff --git a/slideshow/source/engine/box2dtools.cxx b/slideshow/source/engine/box2dtools.cxx index 97e172a4eb4e..161bbe8c37f4 100644 --- a/slideshow/source/engine/box2dtools.cxx +++ b/slideshow/source/engine/box2dtools.cxx @@ -323,7 +323,9 @@ void box2DWorld::setShapeAngleByAngularVelocity( assert(mpBox2DWorld); if (fPassedTime > 0) // this only makes sense if there was an advance in time { - Box2DBodySharedPtr pBox2DBody = mpXShapeToBodyMap.find(xShape)->second; + const auto iter = mpXShapeToBodyMap.find(xShape); + assert(iter != mpXShapeToBodyMap.end()); + Box2DBodySharedPtr pBox2DBody = iter->second; pBox2DBody->setAngleByAngularVelocity(fAngle, fPassedTime); } } @@ -561,7 +563,9 @@ void box2DWorld::queueShapeAnimationEndUpdate( void box2DWorld::alertPhysicsAnimationEnd(const slideshow::internal::ShapeSharedPtr& pShape) { - Box2DBodySharedPtr pBox2DBody = mpXShapeToBodyMap.find(pShape->getXShape())->second; + const auto iter = mpXShapeToBodyMap.find(pShape->getXShape()); + assert(iter != mpXShapeToBodyMap.end()); + Box2DBodySharedPtr pBox2DBody = iter->second; // since the animation ended make the body static makeBodyStatic(pBox2DBody); pBox2DBody->setRestitution(fDefaultStaticBodyBounciness); -- cgit breoffice-6-3'>distro/cib/libreoffice-6-3 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Expand)Author