Frederic Bouvier wrote:
> David Culp wrote:
>
> >
> > > Nope, didn't help.
> > > It seems like the problem starts when all flightplan objects reach
their
> > > destination.
> >
> >
> > I'm not getting segfaults here, but I do see that the AI objects are not
> > binding to properties properly. When I have one sailboat and two
> airplanes
> > running I see an AI count of 3, but only the boat and one airplane show
in
> > the property browser. After the airplanes terminate, the AI count goes
to
> 1,
> > but the airplane[1] properties remain.
> >
> > I'll investigate some more. Thanks for the report.
>
> try this patch :
No, it is not so simple. begin() is a special case where we can't do --
Try the one below
-Fred
Index: AIManager.cxx
===================================================================
RCS file: /var/cvs/FlightGear-0.9/FlightGear/src/AIModel/AIManager.cxx,v
retrieving revision 1.11
diff -u -r1.11 AIManager.cxx
--- a/AIManager.cxx 17 May 2004 08:45:33 -0000 1.11
+++ b/AIManager.cxx 19 May 2004 07:14:44 -0000
@@ -147,9 +147,14 @@
if ((*ai_list_itr)->getDie()) {
freeID((*ai_list_itr)->getID());
delete (*ai_list_itr);
- ai_list.erase(ai_list_itr);
- --ai_list_itr;
--numObjects;
+ if ( ai_list_itr == ai_list.begin() ) {
+ ai_list.erase(ai_list_itr);
+ ai_list_itr = ai_list.begin();
+ continue;
+ } else {
+ ai_list.erase(--ai_list_itr);
+ }
} else {
fetchUserState();
if ((*ai_list_itr)->isa(FGAIBase::otThermal)) {
_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel