Remove warnings about benign situations
This commit is contained in:
parent
f4ff452a58
commit
7d308797ad
@ -331,7 +331,10 @@ void Area2D::_clear_monitoring() {
|
|||||||
|
|
||||||
Object *obj = ObjectDB::get_instance(E->key());
|
Object *obj = ObjectDB::get_instance(E->key());
|
||||||
Node *node = obj ? obj->cast_to<Node>() : NULL;
|
Node *node = obj ? obj->cast_to<Node>() : NULL;
|
||||||
ERR_CONTINUE(!node);
|
|
||||||
|
if (!node) //node may have been deleted in previous frame or at other legiminate point
|
||||||
|
continue;
|
||||||
|
//ERR_CONTINUE(!node);
|
||||||
|
|
||||||
node->disconnect(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_body_enter_tree);
|
node->disconnect(SceneStringNames::get_singleton()->tree_entered, this, SceneStringNames::get_singleton()->_body_enter_tree);
|
||||||
node->disconnect(SceneStringNames::get_singleton()->tree_exited, this, SceneStringNames::get_singleton()->_body_exit_tree);
|
node->disconnect(SceneStringNames::get_singleton()->tree_exited, this, SceneStringNames::get_singleton()->_body_exit_tree);
|
||||||
@ -359,7 +362,7 @@ void Area2D::_clear_monitoring() {
|
|||||||
Object *obj = ObjectDB::get_instance(E->key());
|
Object *obj = ObjectDB::get_instance(E->key());
|
||||||
Node *node = obj ? obj->cast_to<Node>() : NULL;
|
Node *node = obj ? obj->cast_to<Node>() : NULL;
|
||||||
|
|
||||||
if (!node) //node may have been deleted in previous frame, this should not be an error
|
if (!node) //node may have been deleted in previous frame or at other legiminate point
|
||||||
continue;
|
continue;
|
||||||
//ERR_CONTINUE(!node);
|
//ERR_CONTINUE(!node);
|
||||||
|
|
||||||
|
@ -227,7 +227,11 @@ void Area::_clear_monitoring() {
|
|||||||
|
|
||||||
Object *obj = ObjectDB::get_instance(E->key());
|
Object *obj = ObjectDB::get_instance(E->key());
|
||||||
Node *node = obj ? obj->cast_to<Node>() : NULL;
|
Node *node = obj ? obj->cast_to<Node>() : NULL;
|
||||||
ERR_CONTINUE(!node);
|
|
||||||
|
if (!node) //node may have been deleted in previous frame or at other legiminate point
|
||||||
|
continue;
|
||||||
|
//ERR_CONTINUE(!node);
|
||||||
|
|
||||||
if (!E->get().in_tree)
|
if (!E->get().in_tree)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@ -253,7 +257,11 @@ void Area::_clear_monitoring() {
|
|||||||
|
|
||||||
Object *obj = ObjectDB::get_instance(E->key());
|
Object *obj = ObjectDB::get_instance(E->key());
|
||||||
Node *node = obj ? obj->cast_to<Node>() : NULL;
|
Node *node = obj ? obj->cast_to<Node>() : NULL;
|
||||||
ERR_CONTINUE(!node);
|
|
||||||
|
if (!node) //node may have been deleted in previous frame or at other legiminate point
|
||||||
|
continue;
|
||||||
|
//ERR_CONTINUE(!node);
|
||||||
|
|
||||||
if (!E->get().in_tree)
|
if (!E->get().in_tree)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user