cache_end_transaction(): Allow the hook parameter to be NULL.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37461 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
b944766870
commit
bb486a7223
5
src/system/kernel/cache/block_cache.cpp
vendored
5
src/system/kernel/cache/block_cache.cpp
vendored
@ -2768,8 +2768,9 @@ cache_end_transaction(void* _cache, int32 id,
|
||||
|
||||
notify_transaction_listeners(cache, transaction, TRANSACTION_ENDED);
|
||||
|
||||
if (add_transaction_listener(cache, transaction, TRANSACTION_WRITTEN, hook,
|
||||
data) != B_OK) {
|
||||
if (hook != NULL
|
||||
&& add_transaction_listener(cache, transaction, TRANSACTION_WRITTEN,
|
||||
hook, data) != B_OK) {
|
||||
return B_NO_MEMORY;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user