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-19 22:26:33 -04:00
parent e683838e86
commit 6889394848
1 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright 2016, Rene Gollent, rene@gollent.com.
* Copyright 2016-2017, Rene Gollent, rene@gollent.com.
* 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();