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:
authorPhilipp Oeser <info@graphics-engineer.com>2020-03-17 20:58:06 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2020-03-18 22:46:22 +0300
commit1935cd4027ac369f19caae12bb027ff794473d8b (patch)
tree9d5ab5ebf02c42e0d26a981092ded658148ac865 /source/blender/editors
parenta12ae67cf78984a1929070175ec0733dbcf0b480 (diff)
Fix T74837: GPencil: Mirror over first selected marker crashes
'mirror_gpf_marker()' needs a NULL bGPDframe for initialization [but still requires a scene to get the marker]. Maniphest Tasks: T74837 Differential Revision: https://developer.blender.org/D7166
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/gpencil/editaction_gpencil.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/gpencil/editaction_gpencil.c b/source/blender/editors/gpencil/editaction_gpencil.c
index 86355787b3c..7f659efb099 100644
--- a/source/blender/editors/gpencil/editaction_gpencil.c
+++ b/source/blender/editors/gpencil/editaction_gpencil.c
@@ -612,13 +612,13 @@ static short mirror_gpf_marker(bGPDframe *gpf, Scene *scene)
/* In order for this mirror function to work without
* any extra arguments being added, we use the case
- * of bezt==NULL to denote that we should find the
+ * of gpf==NULL to denote that we should find the
* marker to mirror over. The static pointer is safe
* to use this way, as it will be set to null after
* each cycle in which this is called.
*/
- if (gpf) {
+ if (gpf != NULL) {
/* mirroring time */
if ((gpf->flag & GP_FRAME_SELECT) && (marker)) {
diff = (marker->frame - gpf->framenum);
@@ -659,9 +659,9 @@ void ED_gplayer_mirror_frames(bGPDlayer *gpl, Scene *scene, short mode)
ED_gplayer_frames_looper(gpl, scene, mirror_gpf_xaxis);
break;
case MIRROR_KEYS_MARKER: /* mirror over marker */
- mirror_gpf_marker(NULL, NULL);
+ mirror_gpf_marker(NULL, scene);
ED_gplayer_frames_looper(gpl, scene, mirror_gpf_marker);
- mirror_gpf_marker(NULL, NULL);
+ mirror_gpf_marker(NULL, scene);
break;
default: /* just in case */
ED_gplayer_frames_looper(gpl, scene, mirror_gpf_yaxis);