From 99b24413787e8b02b49b615352de5667d8e4aef7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Sun, 22 Jun 2014 21:37:38 -0700 Subject: [PATCH] Added check to prevent multiple calls to bgfx init. --- src/bgfx.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bgfx.cpp b/src/bgfx.cpp index df90410b..878ac055 100644 --- a/src/bgfx.cpp +++ b/src/bgfx.cpp @@ -1784,6 +1784,7 @@ again: void init(RendererType::Enum _type, CallbackI* _callback, bx::ReallocatorI* _allocator) { + BX_CHECK(NULL == s_ctx, "bgfx is already initialized."); BX_TRACE("Init..."); memset(&g_caps, 0, sizeof(g_caps) );