Commit 3e12ac0
Add null check for getModuleState() in cinderx_func_watcher destroy handler
Summary:
During interpreter shutdown, PyFunction_EVENT_DESTROY can fire after
removeModuleState() has set the global state to nullptr. Add a nullptr
check before dereferencing, consistent with the pattern already used
in cinderx_dict_watcher.
Reviewed By: DinoV
Differential Revision: D96862271
fbshipit-source-id: e4329c48d82238081388e17e0db795b470d5ac561 parent bbff470 commit 3e12ac0
1 file changed
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
856 | 856 | | |
857 | 857 | | |
858 | 858 | | |
859 | | - | |
860 | | - | |
861 | | - | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
862 | 864 | | |
863 | 865 | | |
864 | 866 | | |
| |||
0 commit comments