Fixes crash related to animatio editor, closes #8687
(cherry picked from commit cf2fdcb63e
)
This commit is contained in:
parent
da15a1b50d
commit
f6575f8d9a
@ -1294,7 +1294,7 @@ void AnimationKeyEditor::_track_editor_draw() {
|
|||||||
Object *obj = NULL;
|
Object *obj = NULL;
|
||||||
|
|
||||||
RES res;
|
RES res;
|
||||||
Node *node = root->get_node_and_resource(animation->track_get_path(idx), res);
|
Node *node = root ? root->get_node_and_resource(animation->track_get_path(idx), res) : (Node *)NULL;
|
||||||
|
|
||||||
if (res.is_valid()) {
|
if (res.is_valid()) {
|
||||||
obj = res.ptr();
|
obj = res.ptr();
|
||||||
@ -1319,7 +1319,7 @@ void AnimationKeyEditor::_track_editor_draw() {
|
|||||||
|
|
||||||
te->draw_texture(type_icon[animation->track_get_type(idx)], ofs + Point2(0, y + (h - type_icon[0]->get_height()) / 2).floor());
|
te->draw_texture(type_icon[animation->track_get_type(idx)], ofs + Point2(0, y + (h - type_icon[0]->get_height()) / 2).floor());
|
||||||
NodePath np = animation->track_get_path(idx);
|
NodePath np = animation->track_get_path(idx);
|
||||||
Node *n = root->get_node(np);
|
Node *n = root ? root->get_node(np) : (Node *)NULL;
|
||||||
Color ncol = color;
|
Color ncol = color;
|
||||||
if (n && editor_selection->is_selected(n))
|
if (n && editor_selection->is_selected(n))
|
||||||
ncol = track_select_color;
|
ncol = track_select_color;
|
||||||
|
Loading…
Reference in New Issue
Block a user