Fix SIGSEGV when fuse_interrupted() is called outside the eventloop

This commit is contained in:
Alexander 2018-07-09 17:21:32 +07:00 committed by Nikolaus Rath
parent a0c14264e9
commit b045ea4bb7

View File

@ -4417,7 +4417,9 @@ int fuse_getgroups(int size, gid_t list[])
int fuse_interrupted(void)
{
return fuse_req_interrupted(fuse_get_context_internal()->req);
struct fuse_context_i *c = fuse_get_context_internal();
return c->req ? fuse_req_interrupted(c->req) : 0;
}
void fuse_set_getcontext_func(struct fuse_context *(*func)(void))