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:
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/intern/gpu_draw.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c
index 8922846f365..fe47fa3c60e 100644
--- a/source/blender/gpu/intern/gpu_draw.c
+++ b/source/blender/gpu/intern/gpu_draw.c
@@ -720,8 +720,9 @@ void GPU_free_images(void)
{
Image* ima;
- for(ima=G.main->image.first; ima; ima=ima->id.next)
- GPU_free_image(ima);
+ if(G.main)
+ for(ima=G.main->image.first; ima; ima=ima->id.next)
+ GPU_free_image(ima);
}
/* OpenGL Materials */