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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2013-10-12 04:08:33 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2013-10-12 04:08:33 +0400
commit312795225995e93ac47c462c0a4c062c9719592a (patch)
treeff1d6621462da5fa3287bb8bb48d174f980851e4 /source/blender/editors/sculpt_paint
parent8f33609374129c5bced382d351de94c8c5e50861 (diff)
Fix crash running Blender in background mode, caused by revision 60633.
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r--source/blender/editors/sculpt_paint/paint_cursor.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c
index 99339cea995..56143d00afe 100644
--- a/source/blender/editors/sculpt_paint/paint_cursor.c
+++ b/source/blender/editors/sculpt_paint/paint_cursor.c
@@ -91,9 +91,12 @@ static CursorSnapshot cursor_snap = {0};
/* delete overlay cursor textures to preserve memory and invalidate all overlay flags */
void paint_cursor_delete_textures(void)
{
- glDeleteTextures(1, &primary_snap.overlay_texture);
- glDeleteTextures(1, &secondary_snap.overlay_texture);
- glDeleteTextures(1, &cursor_snap.overlay_texture);
+ if (primary_snap.overlay_texture)
+ glDeleteTextures(1, &primary_snap.overlay_texture);
+ if (secondary_snap.overlay_texture)
+ glDeleteTextures(1, &secondary_snap.overlay_texture);
+ if (cursor_snap.overlay_texture)
+ glDeleteTextures(1, &cursor_snap.overlay_texture);
memset(&primary_snap, 0, sizeof(TexSnapshot));
memset(&secondary_snap, 0, sizeof(TexSnapshot));