From 76107a2cd2cd8819c36725fcd1812ccfa8a07705 Mon Sep 17 00:00:00 2001 From: Sergey Semushin Date: Fri, 2 Mar 2018 09:23:03 +0300 Subject: [PATCH] Make ctx->begin 0 if ctx->end became 0. Fixes #634. --- nuklear.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nuklear.h b/nuklear.h index 954e1430..15f2cc7b 100644 --- a/nuklear.h +++ b/nuklear.h @@ -18789,6 +18789,8 @@ nk_clear(struct nk_context *ctx) iter == ctx->active) { ctx->active = iter->prev; ctx->end = iter->prev; + if (!ctx->end) + ctx->begin = 0; if (ctx->active) ctx->active->flags &= ~(unsigned)NK_WINDOW_ROM; }