Ensure the rencache commands buffer is cleared on restart
Fix issue #176 but it should be tested more thoroughly.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include <stdio.h>
|
||||
#include <SDL.h>
|
||||
#include "api/api.h"
|
||||
#include "rencache.h"
|
||||
#include "renderer.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
@@ -158,6 +159,11 @@ init_lua:
|
||||
enable_momentum_scroll();
|
||||
#endif
|
||||
|
||||
/* We need to clear the rencache commands because we may restarting the application
|
||||
and it could be non-empty. It is important to clear the command buffer because it
|
||||
stores pointers to font_desc objects and these are Lua managed. */
|
||||
rencache_clear();
|
||||
|
||||
const char *init_lite_code = \
|
||||
"local core\n"
|
||||
"xpcall(function()\n"
|
||||
|
||||
Reference in New Issue
Block a user