|
|
@@ -1024,6 +1024,10 @@ namespace
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ BX_FREE(gl->m_allocator, gl->uniforms);
|
|
|
+ BX_FREE(gl->m_allocator, gl->verts);
|
|
|
+ BX_FREE(gl->m_allocator, gl->paths);
|
|
|
+ BX_FREE(gl->m_allocator, gl->calls);
|
|
|
BX_FREE(gl->m_allocator, gl->textures);
|
|
|
BX_FREE(gl->m_allocator, gl);
|
|
|
}
|
|
|
@@ -1034,8 +1038,13 @@ NVGcontext* nvgCreate(int edgeaa, unsigned char _viewId, bx::AllocatorI* _alloca
|
|
|
{
|
|
|
if (NULL == _allocator)
|
|
|
{
|
|
|
+#if BX_CONFIG_ALLOCATOR_CRT
|
|
|
static bx::CrtAllocator allocator;
|
|
|
_allocator = &allocator;
|
|
|
+#else
|
|
|
+ BX_CHECK(false, "No allocator has been passed to nvgCreate(). Either specify a bx::AllocatorI instance or enable BX_CONFIG_ALLOCATOR_CRT directive.");
|
|
|
+ return NULL;
|
|
|
+#endif // BX_CONFIG_ALLOCATOR_CRT
|
|
|
}
|
|
|
|
|
|
struct NVGparams params;
|