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:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user