Merge branch 'blender-v2.81-release'
This commit is contained in:
commit
07e335e79d
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue