Make ctx->begin 0 if ctx->end became 0.

Fixes #634.
pull/641/head
Sergey Semushin 2018-03-02 09:23:03 +03:00
parent 45193dc6dd
commit 76107a2cd2
1 changed files with 2 additions and 0 deletions

View File

@ -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;
}