Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions editor/animation/animation_blend_space_1d_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,8 @@ void AnimationNodeBlendSpace1DEditor::_blend_space_draw() {
}

void AnimationNodeBlendSpace1DEditor::_update_space() {
if (updating) {
// edge case when undoing action after editor has changed
if (updating || blend_space.is_null()) {
Comment thread
TokageItLab marked this conversation as resolved.
return;
}

Expand Down Expand Up @@ -587,7 +588,7 @@ void AnimationNodeBlendSpace1DEditor::_tool_switch(int p_tool) {
}

void AnimationNodeBlendSpace1DEditor::_update_edited_point_pos() {
if (updating) {
if (updating || blend_space.is_null()) {
return;
}

Expand Down Expand Up @@ -716,6 +717,9 @@ void AnimationNodeBlendSpace1DEditor::_edit_point_index(double p_index) {

void AnimationNodeBlendSpace1DEditor::_set_selected_point(int p_index) {
selected_point = p_index;
if (blend_space.is_null()) {
return;
}
_update_tool_erase();
if (p_index != -1) {
_update_edited_point_pos();
Expand Down
7 changes: 5 additions & 2 deletions editor/animation/animation_blend_space_2d_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ void AnimationNodeBlendSpace2DEditor::_snap_toggled() {
}

void AnimationNodeBlendSpace2DEditor::_update_space() {
if (updating) {
if (updating || blend_space.is_null()) {
return;
}

Expand Down Expand Up @@ -891,7 +891,7 @@ void AnimationNodeBlendSpace2DEditor::_erase_selected() {
}

void AnimationNodeBlendSpace2DEditor::_update_edited_point_pos() {
if (updating) {
if (updating || blend_space.is_null()) {
return;
}

Expand Down Expand Up @@ -968,6 +968,9 @@ void AnimationNodeBlendSpace2DEditor::_edit_point_index(double p_index) {

void AnimationNodeBlendSpace2DEditor::_set_selected_point(int p_index) {
selected_point = p_index;
if (blend_space.is_null()) {
return;
}
_update_tool_erase();
if (p_index != -1) {
_update_edited_point_pos();
Expand Down
Loading