diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2019-01-16 10:35:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-16 10:35:08 +0100 |
commit | f2dd477223b54f9a65a52c877d83d58baf7ff1c3 (patch) | |
tree | 0b2ab81ba907896af7f1228581ee73953fca83df | |
parent | ffcb5cd18caecd29c207ed8edc8c55822f20c1d0 (diff) | |
parent | b8a524efa35aabc6537f7d0ca79b0cd086ba8a47 (diff) |
Merge pull request #25022 from jlahman/nullptr-test-order-fix
Fix order of a nullptr test in canvas item editor
-rw-r--r-- | editor/plugins/canvas_item_editor_plugin.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index b0e812a130..86d6799b19 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -573,10 +573,10 @@ bool CanvasItemEditor::_get_bone_shape(Vector<Vector2> *shape, Vector<Vector2> * Node2D *from_node = Object::cast_to<Node2D>(ObjectDB::get_instance(bone->key().from)); Node2D *to_node = Object::cast_to<Node2D>(ObjectDB::get_instance(bone->key().to)); - if (!from_node->is_inside_tree()) - return false; //may have been removed if (!from_node) return false; + if (!from_node->is_inside_tree()) + return false; //may have been removed if (!to_node && bone->get().length == 0) return false; |