diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/buffer.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/buffer.c b/src/buffer.c index 48dbdca..e9ecadc 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -74,14 +74,15 @@ buffer_free(struct buffer *b) } struct buffer * -lookup_buffer(int domid, int buf_id) +buffer_lookup(int domid, int buf_id) { struct client *c = client_lookup(domid); struct buffer *b; - LIST_FOREACH(b, &c->buffers, client_next) - if (b->id == buf_id) - return b; + if (c) + LIST_FOREACH(b, &c->buffers, client_next) + if (b->id == buf_id) + return b; return NULL; } |