]> git.mxchange.org Git - simgear.git/commitdiff
Fix debug runtime assert
authorJames Turner <zakalawe@mac.com>
Wed, 29 Jun 2016 15:26:42 +0000 (16:26 +0100)
committerRoland Haeder <roland@mxchange.org>
Sat, 13 Aug 2016 08:21:16 +0000 (10:21 +0200)
simgear/props/PropertyInterpolationMgr.cxx

index ad8060e2f59f8d3bb0413cd23e5ba4dad5cc5d34..1e8ac02cb65d2b41f38d38b7cac55ea634a404a0 100644 (file)
@@ -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;
+         }
     }
   }