diff --git a/AK/SharedBuffer.cpp b/AK/SharedBuffer.cpp index 3c46169db12..c0ce19db742 100644 --- a/AK/SharedBuffer.cpp +++ b/AK/SharedBuffer.cpp @@ -69,10 +69,8 @@ RefPtr SharedBuffer::create_from_shbuf_id(int shbuf_id) { size_t size = 0; void* data = shbuf_get(shbuf_id, &size); - if (data == (void*)-1) { - perror("shbuf_get"); + if (data == (void*)-1) return nullptr; - } return adopt(*new SharedBuffer(shbuf_id, size, data)); }