From c7ee4aa8a4d782489dd8011bd9edab38eb405b3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Sun, 20 May 2018 09:30:28 -0700 Subject: [PATCH] Cleanup. --- src/bgfx.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/bgfx.cpp b/src/bgfx.cpp index 3f0ad590c..27690eeda 100644 --- a/src/bgfx.cpp +++ b/src/bgfx.cpp @@ -4778,12 +4778,16 @@ BGFX_C_API void bgfx_init_ctor(bgfx_init_t* _init) BGFX_C_API bool bgfx_init(const bgfx_init_t* _init) { bgfx_init_t init = *_init; - if (init.callback != NULL) { + + if (init.callback != NULL) + { static bgfx::CallbackC99 s_callback; s_callback.m_interface = init.callback; init.callback = reinterpret_cast(&s_callback); } - if (init.allocator != NULL) { + + if (init.allocator != NULL) + { static bgfx::AllocatorC99 s_allocator; s_allocator.m_interface = init.allocator; init.allocator = reinterpret_cast(&s_allocator);