File tree 1 file changed +6
-4
lines changed
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -974,7 +974,7 @@ static void eventFreeTrigger(ACTIVE_TRIGGER *psTrigger)
974
974
// Activate a callback trigger
975
975
void eventFireCallbackTrigger (TRIGGER_TYPE callback )
976
976
{
977
- ACTIVE_TRIGGER * psPrev = NULL , * psCurr , * psNext ;
977
+ ACTIVE_TRIGGER * psPrev = NULL , * psCurr , * psNext , * * ppsNext ;
978
978
TRIGGER_DATA * psTrigDat ;
979
979
BOOL fired ;
980
980
@@ -986,9 +986,9 @@ void eventFireCallbackTrigger(TRIGGER_TYPE callback)
986
986
987
987
//this can be called from eventProcessTriggers and so will wipe out all the current added ones
988
988
//psAddedTriggers = NULL;
989
- for (psCurr = psCallbackList ; psCurr && psCurr -> type <= (int )callback ; psCurr = psNext )
989
+ for (psCurr = psCallbackList ; psCurr && psCurr -> type <= (int )callback ; psCurr = * ppsNext )
990
990
{
991
- psNext = psCurr -> psNext ;
991
+ ppsNext = & psCurr -> psNext ;
992
992
if (psCurr -> type == (int )callback )
993
993
{
994
994
// see if the callback should be fired
@@ -1035,10 +1035,12 @@ void eventFireCallbackTrigger(TRIGGER_TYPE callback)
1035
1035
if (psPrev == NULL )
1036
1036
{
1037
1037
psCallbackList = psCallbackList -> psNext ;
1038
+ ppsNext = & psCallbackList ;
1038
1039
}
1039
1040
else
1040
1041
{
1041
- psPrev -> psNext = psNext ;
1042
+ psPrev -> psNext = * ppsNext ;
1043
+ ppsNext = & psPrev -> psNext ;
1042
1044
}
1043
1045
1044
1046
triggerChanged = false;
You can’t perform that action at this time.
0 commit comments