rb_th_serial(th)
allows th == NULL
This commit is contained in:
parent
822f01b36c
commit
f3acaf312c
@ -1078,7 +1078,7 @@ typedef struct rb_thread_struct {
|
|||||||
static inline unsigned int
|
static inline unsigned int
|
||||||
rb_th_serial(const rb_thread_t *th)
|
rb_th_serial(const rb_thread_t *th)
|
||||||
{
|
{
|
||||||
return (unsigned int)th->serial;
|
return th ? (unsigned int)th->serial : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user