Skip to content

Commit

Permalink
Merge pull request #113 from orocos-toolchain/self-deactivating-fsm
Browse files Browse the repository at this point in the history
scripting: added missing zero-pointer checks in StateMachine::executePending()
  • Loading branch information
meyerj committed Aug 10, 2016
1 parent 7d0cb92 commit af51d68
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions rtt/scripting/StateMachine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1002,11 +1002,11 @@ namespace RTT {
TRACE("executePending..." );

if ( currentEntry ) {
TRACE("Executing entry program of '"+ current->getName() +"'" );
TRACE("Executing entry program of '"+ (current ? current->getName() : "(null)") +"'" );
if ( this->executeProgram(currentEntry, stepping) == false )
return false;
// done.
TRACE("Finished entry program of '"+ current->getName() +"'" );
TRACE("Finished entry program of '"+ (current ? current->getName() : "(null)") +"'" );
// in stepping mode, delay 'true' one executePending().
if ( stepping ) {
currentProg = currentRun;
Expand Down Expand Up @@ -1036,7 +1036,7 @@ namespace RTT {

// last is exit
if ( currentExit ) {
TRACE("Executing exit program from '"+ current->getName() + "' (going to '"+ (next ? next->getName() : "(null)") +"')" );
TRACE("Executing exit program from '"+ (current ? current->getName() : "(null)") + "' (going to '"+ (next ? next->getName() : "(null)") +"')" );
if ( this->executeProgram(currentExit, stepping) == false )
return false;
// done.
Expand Down Expand Up @@ -1078,7 +1078,7 @@ namespace RTT {

// give new current a chance to execute the entry program and run program :
if ( currentEntry ) {
TRACE("Executing entry program of '"+ current->getName() +"'" );
TRACE("Executing entry program of '"+ (current ? current->getName() : "(null)") +"'" );
if ( this->executeProgram(currentEntry, stepping) == false )
return false;
// done.
Expand All @@ -1092,7 +1092,7 @@ namespace RTT {

// Handle is executed after the transitions failed.
if ( currentHandle ) {
TRACE("Executing handle program of '"+ current->getName() +"'" );
TRACE("Executing handle program of '"+ (current ? current->getName() : "(null)") +"'" );
if ( this->executeProgram(currentHandle, stepping) == false )
return false;
// done.
Expand All @@ -1106,7 +1106,7 @@ namespace RTT {

// Run is executed before the transitions.
if ( currentRun ) {
TRACE("Executing run program of '"+ current->getName() +"'" );
TRACE("Executing run program of '"+ (current ? current->getName() : "(null)") +"'" );
if ( this->executeProgram(currentRun, stepping) == false )
return false;
// done.
Expand Down

0 comments on commit af51d68

Please sign in to comment.