Merge pull request #33750 from lupoDharkael/gradient
GradientEdit: Fix index crashes
This commit is contained in:
commit
60711e6738
|
@ -277,12 +277,13 @@ void GradientEdit::_gui_input(const Ref<InputEvent> &p_event) {
|
|||
|
||||
if (points[i].offset == newofs && i != grabbed) {
|
||||
valid = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!valid)
|
||||
if (!valid || grabbed == -1) {
|
||||
return;
|
||||
|
||||
}
|
||||
points.write[grabbed].offset = newofs;
|
||||
|
||||
points.sort();
|
||||
|
|
Loading…
Reference in New Issue