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:
Rene Gollent
2017-05-21 19:54:48 -04:00
parent e683838e86
commit 6889394848
@@ -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.
*/
#include "TargetHostInterfaceRoster.h"
@@ -96,6 +96,8 @@ TargetHostInterfaceRoster::RegisterInterfaceInfos()
if (info == NULL) \
return B_NO_MEMORY; \
interfaceReference.SetTo(info, true); \
if (info->Init() != B_OK) \
return B_NO_MEMORY; \
if (!fInterfaceInfos.AddItem(info)) \
return B_NO_MEMORY; \
interfaceReference.Detach();