Fix graph editor messing up when no animator selected

This commit is contained in:
JannisX11 2023-04-21 17:07:06 +02:00
parent d36d8c4a6e
commit 3c53a71f75

View File

@ -1223,7 +1223,7 @@ Interface.definePanels(() => {
}
},
getSelectedGraphRange() {
if (Keyframe.selected.length == 0) return null;
if (Keyframe.selected.length == 0 || !this.graph_editor_animator) return null;
let keyframes = this.graph_editor_animator[this.graph_editor_channel];
if (!keyframes || keyframes.length < 2) return null;
let range = [Infinity, -Infinity];