Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/blender/gpu/intern/gpu_draw.c2
1 files changed, 1 insertions, 1 deletions
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);
}