diff options
author | Koichi Sasada <ko1@atdot.net> | 2023-04-04 15:42:37 +0900 |
---|---|---|
committer | Koichi Sasada <ko1@atdot.net> | 2023-04-04 15:42:37 +0900 |
commit | f3acaf312c2a0069acd279edc0ceafcc34ddfdc3 (patch) | |
tree | 5ff58e22723e0d30ed2010e1bdb7962d0cc1c249 /vm_core.h | |
parent | 822f01b36c7f9bf3b9f36eba3a508844908b7902 (diff) |
`rb_th_serial(th)` allows `th == NULL`
Diffstat (limited to 'vm_core.h')
-rw-r--r-- | vm_core.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1078,7 +1078,7 @@ typedef struct rb_thread_struct { static inline unsigned int rb_th_serial(const rb_thread_t *th) { - return (unsigned int)th->serial; + return th ? (unsigned int)th->serial : 0; } typedef enum { |