зеркало из https://github.com/github/ruby.git
`rb_th_serial(th)` allows `th == NULL`
This commit is contained in:
Родитель
822f01b36c
Коммит
f3acaf312c
|
@ -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 {
|
||||
|
|
Загрузка…
Ссылка в новой задаче