From b2a0694281141523a95d3709a333e6b72aac75cc Mon Sep 17 00:00:00 2001 From: fgenesis Date: Thu, 5 May 2016 03:52:22 +0200 Subject: [PATCH] Very tiny cleanup --- Aquaria/AnimationEditor.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Aquaria/AnimationEditor.cpp b/Aquaria/AnimationEditor.cpp index ee28a26..15393a2 100644 --- a/Aquaria/AnimationEditor.cpp +++ b/Aquaria/AnimationEditor.cpp @@ -618,11 +618,11 @@ void AnimationEditor::rebuildKeyframeWidgets() offx = keyframeWidgets[i]->offset.x; } keyframeWidgets.clear(); - for (int i = 0; i < 1000; i++) + if (Animation *a = editSprite->getCurrentAnimation()) { - if (editSprite->getCurrentAnimation()) + for (int i = 0; i < 1000; i++) { - SkeletalKeyframe *key = editSprite->getCurrentAnimation()->getKeyframe(i); + SkeletalKeyframe *key = a->getKeyframe(i); if (!key) break; KeyframeWidget *k = new KeyframeWidget(i); k->offset.x = offx;