Skip to content

Commit

Permalink
fix crash loop
Browse files Browse the repository at this point in the history
  • Loading branch information
shana-apple committed Oct 19, 2020
1 parent ac58875 commit 131e713
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@
#include <stdlib.h>

#include "CHIPDeviceManager.h"
#include <lib/support/CodeUtils.h>
#include <setup_payload/SetupPayload.h>
#include <support/CHIPMem.h>
#include <support/CodeUtils.h>
#include <support/ErrorStr.h>

namespace chip {
Expand Down Expand Up @@ -77,6 +78,9 @@ CHIP_ERROR CHIPDeviceManager::Init(CHIPDeviceManagerCallbacks * cb)
break;
}

err = Platform::MemoryInit();
SuccessOrExit(err);

// Register a function to receive events from the CHIP device layer. Note that calls to
// this function will happen on the CHIP event loop thread, not the app_main thread.
PlatformMgr().AddEventHandler(CHIPDeviceManager::CommonDeviceEventHandler, reinterpret_cast<intptr_t>(cb));
Expand Down

0 comments on commit 131e713

Please sign in to comment.