Fix Android crash

This commit is contained in:
elasota
2021-05-14 19:30:31 -04:00
parent 71115b2366
commit 240ba88f53
3 changed files with 7 additions and 1 deletions

View File

@@ -14,6 +14,7 @@ LOCAL_CFLAGS := -DGP_DEBUG_CONFIG=0
# Add your application source files here...
LOCAL_SRC_FILES := \
GpAllocator_C.cpp \
GpThreadEvent_Cpp11.cpp \
GpSystemServices_POSIX.cpp

View File

@@ -104,7 +104,7 @@ void GpAllocator_C::Free(void *buf)
const GpAllocator_C_MMBlock *mmBlock = reinterpret_cast<const GpAllocator_C_MMBlock*>(bytes - GpAllocator_C_MMBlock::AlignedSize());
void *freeLoc = bytes - GpAllocator_C_MMBlock::AlignedSize() - mmBlock->m_offsetFromAllocLocation;
realloc(freeLoc, 0);
(void)realloc(freeLoc, 0);
}
GpAllocator_C *GpAllocator_C::GetInstance()