base: fix bug in Object_pool::first_locked

fix #899
This commit is contained in:
Martin Stein 2013-10-07 12:28:40 +02:00 committed by Norman Feske
parent 0ad655f4be
commit 563760eb08

View File

@ -206,6 +206,7 @@ namespace Genode {
{
Lock::Guard lock_guard(_lock);
OBJ_TYPE * const obj_typed = (OBJ_TYPE *)_tree.first();
if (!obj_typed) { return 0; }
obj_typed->lock();
return obj_typed;
}