diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 57e9c8ce4..e77a75e8c 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,6 @@ +August 27, 2006 (Changes by Graf Zahl) +- fixed: callstatechain didn`t check for NULL code pointers + August 25, 2006 - Fixed: Multiple-choice sound sequences could not be assigned IDs for use with polyobjects and the sound sequence selector things. diff --git a/src/thingdef_codeptr.cpp b/src/thingdef_codeptr.cpp index cb24d2236..36fbbdca3 100644 --- a/src/thingdef_codeptr.cpp +++ b/src/thingdef_codeptr.cpp @@ -109,12 +109,15 @@ bool ACustomInventory::CallStateChain (AActor *actor, FState * State) while (State != NULL) { // Assume success. The code pointer will set this to false if necessary - StateCall.Result = true; CallingState = StateCall.State = State; - State->GetAction() (actor); + if (State->GetAction() != NULL) + { + StateCall.Result = true; + State->GetAction() (actor); + // collect all the results. Even one successful call signifies overall success. + result |= StateCall.Result; + } - // collect all the results. Even one successful call signifies overall success. - result |= StateCall.Result; // Since there are no delays it is a good idea to check for infinite loops here! counter++;