diff --git a/dist/MessagesForMacintosh.dsk b/dist/MessagesForMacintosh.dsk index d9faf81..53acfe8 100644 Binary files a/dist/MessagesForMacintosh.dsk and b/dist/MessagesForMacintosh.dsk differ diff --git a/dist/MessagesForMacintosh.zip b/dist/MessagesForMacintosh.zip index 590c817..a531143 100644 Binary files a/dist/MessagesForMacintosh.zip and b/dist/MessagesForMacintosh.zip differ diff --git a/nuklear_quickdraw.h b/nuklear_quickdraw.h index fc588e2..e040b23 100644 --- a/nuklear_quickdraw.h +++ b/nuklear_quickdraw.h @@ -1086,6 +1086,7 @@ void updateBounds(int top, int bottom, int left, int right) { #ifdef COMMAND_CACHING int lastCalls = 0; int currentCalls; + const struct nk_command *lastCmd; #endif NK_API void nk_quickdraw_render(WindowPtr window, struct nk_context *ctx) { @@ -1136,7 +1137,6 @@ NK_API void nk_quickdraw_render(WindowPtr window, struct nk_context *ctx) { #endif #ifdef COMMAND_CACHING - const struct nk_command *lastCmd = malloc(sizeof(struct nk_command)); lastCmd = nk_ptr_add_const(struct nk_command, last, 0); #endif @@ -1499,6 +1499,10 @@ NK_API struct nk_context* nk_quickdraw_init(unsigned int width, unsigned int hei NkQuickDrawFont *quickdrawfont = nk_quickdraw_font_create_from_file(); struct nk_user_font *font = &quickdrawfont->nk; + #ifdef COMMAND_CACHING + lastCmd = malloc(sizeof(struct nk_command)); + #endif + last = calloc(1, MAX_MEMORY_IN_KB * 1024); buf = calloc(1, MAX_MEMORY_IN_KB * 1024); nk_init_fixed(&quickdraw.nuklear_context, buf, MAX_MEMORY_IN_KB * 1024, font);