Some old changes I forgot to commit... BInputServerDevice::InitCheck()

now checks if the fOwner allocation went fine (and returns B_NO_MEMORY 
in case it didn't). Since it can fail, inherited classes should call it 
as well (I modified MouseInputDevice's and KeyboardInputDevice's 
versions for now)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23106 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini
2007-12-10 21:20:25 +00:00
parent f6c512f8e3
commit d246d9be88
3 changed files with 15 additions and 6 deletions
@@ -1,9 +1,11 @@
/*
* Copyright 2004-2006, Haiku.
* Copyright 2004-2007, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stefano Ceccherini
* Stefano Ceccherini ([email protected])
* Jérôme Duval
* Axel Dörfler, [email protected]
*/
@@ -97,7 +99,7 @@ LOG(const char *fmt, ...)
extern "C" BInputServerDevice *
instantiate_input_device()
{
return new MouseInputDevice();
return new (std::nothrow) MouseInputDevice();
}
@@ -443,7 +445,7 @@ status_t
MouseInputDevice::InitCheck()
{
CALLED();
return B_OK;
return BInputServerDevice::InitCheck();
}