aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sokol_gfx.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sokol_gfx.h b/sokol_gfx.h
index 18d0692c..b78e6999 100644
--- a/sokol_gfx.h
+++ b/sokol_gfx.h
@@ -24553,6 +24553,7 @@ _SOKOL_PRIVATE void _sg_override_portable_limits(void) {
//
// >>public
SOKOL_API_IMPL void sg_setup(const sg_desc* desc) {
+ SOKOL_ASSERT(!_sg.valid);
SOKOL_ASSERT(desc);
SOKOL_ASSERT((desc->_start_canary == 0) && (desc->_end_canary == 0));
SOKOL_ASSERT((desc->allocator.alloc_fn && desc->allocator.free_fn) || (!desc->allocator.alloc_fn && !desc->allocator.free_fn));
@@ -24568,6 +24569,7 @@ SOKOL_API_IMPL void sg_setup(const sg_desc* desc) {
}
SOKOL_API_IMPL void sg_shutdown(void) {
+ SOKOL_ASSERT(_sg.valid);
_sg_discard_all_resources();
_sg_discard_backend();
_sg_discard_commit_listeners();