libdebugger: Fix missing init in TargetHostInterfaceRoster.
- When adding the TargetHostInterfaceInfos to the roster, Init() was not called on the individual instances, leading to them potentially being incomplete.
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2016, Rene Gollent, [email protected].
|
* Copyright 2016-2017, Rene Gollent, [email protected].
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
#include "TargetHostInterfaceRoster.h"
|
#include "TargetHostInterfaceRoster.h"
|
||||||
@@ -96,6 +96,8 @@ TargetHostInterfaceRoster::RegisterInterfaceInfos()
|
|||||||
if (info == NULL) \
|
if (info == NULL) \
|
||||||
return B_NO_MEMORY; \
|
return B_NO_MEMORY; \
|
||||||
interfaceReference.SetTo(info, true); \
|
interfaceReference.SetTo(info, true); \
|
||||||
|
if (info->Init() != B_OK) \
|
||||||
|
return B_NO_MEMORY; \
|
||||||
if (!fInterfaceInfos.AddItem(info)) \
|
if (!fInterfaceInfos.AddItem(info)) \
|
||||||
return B_NO_MEMORY; \
|
return B_NO_MEMORY; \
|
||||||
interfaceReference.Detach();
|
interfaceReference.Detach();
|
||||||
|
|||||||
Reference in New Issue
Block a user