Fix T55675: Crash internal animation player

This commit is contained in:
Campbell Barton 2018-07-01 21:07:18 +02:00
parent 37994e0af2
commit bf7c815169
Notes: blender-bot 2023-02-14 06:17:17 +01:00
Referenced by issue #55698, 2nd Instance of Blender Opening
Referenced by issue #55689, Mac OS X 10.13.5, Blender 2.80 crash when try render use Eevee
Referenced by issue #55675, crash internal animation player
1 changed files with 3 additions and 2 deletions

View File

@ -67,6 +67,7 @@
#include "GPU_immediate.h"
#include "GPU_immediate_util.h"
#include "GPU_batch.h"
#include "GPU_init_exit.h"
#include "DNA_scene_types.h"
#include "ED_datafiles.h" /* for fonts */
@ -1266,7 +1267,7 @@ static char *wm_main_playanim_intern(int argc, const char **argv)
/* initialize OpenGL immediate mode */
g_WS.gwn_context = GWN_context_create();
immInit();
GPU_init();
/* initialize the font */
BLF_init();
@ -1540,7 +1541,7 @@ static char *wm_main_playanim_intern(int argc, const char **argv)
GPU_shader_free_builtin_shaders();
immDestroy();
GPU_exit();
if (g_WS.gwn_context) {
GWN_context_active_set(g_WS.gwn_context);