From a7f59ab388efce9a6eb9b7040f7cfc26fd5dd453 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Thu, 23 Sep 2021 12:40:40 +0100 Subject: [PATCH] Add `asserts` to `begin_window` and `begin_panel` --- vendor/microui/microui.odin | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vendor/microui/microui.odin b/vendor/microui/microui.odin index 65b99b8e5..34617f66f 100644 --- a/vendor/microui/microui.odin +++ b/vendor/microui/microui.odin @@ -1279,6 +1279,7 @@ end_root_container :: proc(ctx: ^Context) { } begin_window :: proc(ctx: ^Context, title: string, rect: Rect, opt := Options{}) -> bool { + assert(title != "", "missing window title") id := get_id(ctx, title) cnt := internal_get_container(ctx, id, opt) if cnt == nil || !cnt.open { @@ -1415,6 +1416,7 @@ scoped_end_popup :: proc(ctx: ^Context, _: string, ok: bool) { } begin_panel :: proc(ctx: ^Context, name: string, opt := Options{}) { + assert(name != "", "missing panel name") push_id(ctx, name) cnt := internal_get_container(ctx, ctx.last_id, opt) cnt.rect = layout_next(ctx)