Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
jan.nijtmans committed Oct 11, 2024
2 parents b3f8bd0 + 285b712 commit 693cf85
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions generic/tkError.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,11 @@ Tk_DeleteErrorHandler(

errorPtr->lastRequest = NextRequest(dispPtr->display) - 1;

/*
* Ensure that no user callback for this handler is invoked any further.
*/
errorPtr->errorProc = NULL;

/*
* Every once-in-a-while, cleanup handlers that are no longer active. We
* probably won't be able to free the handler that was just deleted (need
Expand All @@ -164,8 +169,6 @@ Tk_DeleteErrorHandler(
* there are many handlers that stay around forever).
*/

errorPtr->errorProc = NULL;

if (dispPtr->deleteCount++ >= 9) {
TkErrorHandler *prevPtr;
TkErrorHandler *nextPtr;
Expand Down

0 comments on commit 693cf85

Please sign in to comment.