Commit db95ebef authored by Matthew Hausknecht's avatar Matthew Hausknecht

Fixed segfault with uninitialized action chain.

parent b9548574
...@@ -71,6 +71,7 @@ public: ...@@ -71,6 +71,7 @@ public:
const const
ActionChainHolder & i(); ActionChainHolder & i();
bool initialized() { return M_graph != NULL; }
public: public:
void setFieldEvaluator( const FieldEvaluator::ConstPtr & evaluator ); void setFieldEvaluator( const FieldEvaluator::ConstPtr & evaluator );
......
...@@ -200,6 +200,11 @@ Neck_OffensiveInterceptNeck::execute( PlayerAgent * agent ) ...@@ -200,6 +200,11 @@ Neck_OffensiveInterceptNeck::execute( PlayerAgent * agent )
// //
// //
if ( ! ActionChainHolder::instance().initialized() )
{
return false;
}
if ( self_min == 5 if ( self_min == 5
&& trap_ball_speed > wm.self().playerType().kickableArea() * 1.7 ) && trap_ball_speed > wm.self().playerType().kickableArea() * 1.7 )
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment