From: ehofman Date: Wed, 19 Nov 2003 15:16:21 +0000 (+0000) Subject: Frederic Bouvier wrote: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=5f22c93db7486bf7b0f2dfc86f9b4894d2ab2053;p=simgear.git Frederic Bouvier wrote: > When a c172 is on one machine, I only got segfault on an animation > not found. This animation is named ControlsGroup and I guess > that one object name referenced in this null animation no > longer exist in the .ac model. I say that because the > preceding one is analogous and works. > > So I would say the multiplayer works, except when there is a c172. It seems that this animation refers to 'PanelInstruments' that is a panel outside the model, so, when loaded with SGModelLib::load_model the object is not found in the model and there is a non tested read access through a null pointer in sgMakeAnimation. --- diff --git a/simgear/scene/model/model.cxx b/simgear/scene/model/model.cxx index 757c3d2c..956050db 100644 --- a/simgear/scene/model/model.cxx +++ b/simgear/scene/model/model.cxx @@ -150,6 +150,9 @@ sgMakeAnimation( ssgBranch * model, } else { object = model; } + + if ( animation == 0 ) + return; ssgBranch * branch = animation->getBranch(); splice_branch(branch, object);