From 6fd5b9ca798167b909baffecdc2b2d4f55746f15 Mon Sep 17 00:00:00 2001 From: James Turner Date: Wed, 29 Jun 2016 16:26:42 +0100 Subject: [PATCH] Fix debug runtime assert --- simgear/props/PropertyInterpolationMgr.cxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/simgear/props/PropertyInterpolationMgr.cxx b/simgear/props/PropertyInterpolationMgr.cxx index ad8060e2..1e8ac02c 100644 --- a/simgear/props/PropertyInterpolationMgr.cxx +++ b/simgear/props/PropertyInterpolationMgr.cxx @@ -70,6 +70,12 @@ namespace simgear break; } } + + // needed to avoid incrementing an invalid iterator when we + // erase the last interpolator + if (it == _interpolators.end()) { + break; + } } } -- 2.39.5