From 4a34d86f329ed6728585a4eb9b5b817684d784b8 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Sun, 23 Jun 2013 13:58:59 +0000 Subject: Fix #35848: render crash in background mode due to missing G.main. --- source/blender/gpu/intern/gpu_draw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender') diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c index 9ed1f994a33..e98f8988aa6 100644 --- a/source/blender/gpu/intern/gpu_draw.c +++ b/source/blender/gpu/intern/gpu_draw.c @@ -1147,7 +1147,7 @@ void GPU_free_unused_buffers(void) ima = node->link; /* check in case it was freed in the meantime */ - if (BLI_findindex(&G.main->image, ima) != -1) + if (G.main && BLI_findindex(&G.main->image, ima) != -1) GPU_free_image(ima); } -- cgit v1.2.3