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:
authorAntonio Vazquez <blendergit@gmail.com>2019-11-02 13:50:44 +0300
committerAntonio Vazquez <blendergit@gmail.com>2019-11-02 13:50:44 +0300
commit07968604ab190156bd0c931865bd133abd3bf745 (patch)
tree8d68ec1d11170f18d7a3c9c6d85d19fae8083e52 /source/blender/editors/gpencil/gpencil_utils.c
parent1c8d76772a84cb616c498ffbaf0a262086b0f8fa (diff)
GPencil: Some NULL checks missing in previous T71260 fix
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_utils.c')
-rw-r--r--source/blender/editors/gpencil/gpencil_utils.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c
index 3ca993673d4..91af444c28a 100644
--- a/source/blender/editors/gpencil/gpencil_utils.c
+++ b/source/blender/editors/gpencil/gpencil_utils.c
@@ -2548,6 +2548,11 @@ tGPspoint *ED_gpencil_sbuffer_ensure(tGPspoint *buffer_array,
*buffer_size += GP_STROKE_BUFFER_CHUNK;
p = MEM_recallocN(buffer_array, sizeof(struct tGPspoint) * *buffer_size);
}
+
+ if (p == NULL) {
+ *buffer_size = *buffer_used = 0;
+ }
+
buffer_array = p;
}