diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2019-11-02 13:50:44 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2019-11-02 13:50:44 +0300 |
commit | 07968604ab190156bd0c931865bd133abd3bf745 (patch) | |
tree | 8d68ec1d11170f18d7a3c9c6d85d19fae8083e52 /source/blender/editors/gpencil/gpencil_paint.c | |
parent | 1c8d76772a84cb616c498ffbaf0a262086b0f8fa (diff) |
GPencil: Some NULL checks missing in previous T71260 fix
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_paint.c')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_paint.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index bebdcb34326..c34e670c872 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -837,6 +837,11 @@ static short gp_stroke_addpoint( gpd->runtime.sbuffer = ED_gpencil_sbuffer_ensure( gpd->runtime.sbuffer, &gpd->runtime.sbuffer_size, &gpd->runtime.sbuffer_used, false); + /* Check the buffer was created. */ + if (gpd->runtime.sbuffer == NULL) { + return GP_STROKEADD_INVALID; + } + /* get pointer to destination point */ pt = ((tGPspoint *)(gpd->runtime.sbuffer) + gpd->runtime.sbuffer_used); |