Fix T62066: Seg Fault Baking Light Cache with "--background" Flag

This commit is contained in:
2019-03-07 03:51:00 +01:00
parent dabf593163
commit 97b1739cf1

View File

@@ -2705,6 +2705,9 @@ void DRW_opengl_context_disable_ex(bool restore)
void DRW_opengl_context_enable(void) void DRW_opengl_context_enable(void)
{ {
if (G.background && DST.gl_context == NULL) {
WM_init_opengl(G_MAIN);
}
DRW_opengl_context_enable_ex(true); DRW_opengl_context_enable_ex(true);
} }