diff --git a/src/build/libroot/thread.cpp b/src/build/libroot/thread.cpp index 7998694b1d..b359027492 100644 --- a/src/build/libroot/thread.cpp +++ b/src/build/libroot/thread.cpp @@ -38,11 +38,11 @@ find_thread(const char *name) } // _get_thread_info -// status_t -// _get_thread_info(thread_id id, thread_info *info, size_t size) -// { -// return B_ERROR; -// } +status_t +_get_thread_info(thread_id id, thread_info* info, size_t size) +{ + return B_ERROR; +} // _get_next_thread_info // status_t diff --git a/src/kits/support/Referenceable.cpp b/src/kits/support/Referenceable.cpp index ca849f81e8..fcc981cb00 100644 --- a/src/kits/support/Referenceable.cpp +++ b/src/kits/support/Referenceable.cpp @@ -47,8 +47,8 @@ BReferenceable::~BReferenceable() // stack range to be sure. thread_info info; status_t result = get_thread_info(find_thread(NULL), &info); - if (result != B_OK || this < info.stack_base - || this > info.stack_end) { + if (result == B_OK && (this < info.stack_base + || this > info.stack_end)) { snprintf(message, sizeof(message), "Deleted referenceable " "object that's not on the stack (this: %p, stack_base: %p," " stack_end: %p)\n", this, info.stack_base,