mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Remove warnings about benign situations
This commit is contained in:
parent
171d8a501f
commit
73fb33a931
2 changed files with 13 additions and 4 deletions
|
|
@ -329,7 +329,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()->enter_tree, this, SceneStringNames::get_singleton()->_body_enter_tree);
|
node->disconnect(SceneStringNames::get_singleton()->enter_tree, this, SceneStringNames::get_singleton()->_body_enter_tree);
|
||||||
node->disconnect(SceneStringNames::get_singleton()->exit_tree, this, SceneStringNames::get_singleton()->_body_exit_tree);
|
node->disconnect(SceneStringNames::get_singleton()->exit_tree, this, SceneStringNames::get_singleton()->_body_exit_tree);
|
||||||
|
|
@ -357,7 +360,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,10 @@ 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);
|
||||||
|
|
||||||
node->disconnect(SceneStringNames::get_singleton()->enter_tree, this, SceneStringNames::get_singleton()->_body_enter_tree);
|
node->disconnect(SceneStringNames::get_singleton()->enter_tree, this, SceneStringNames::get_singleton()->_body_enter_tree);
|
||||||
node->disconnect(SceneStringNames::get_singleton()->exit_tree, this, SceneStringNames::get_singleton()->_body_exit_tree);
|
node->disconnect(SceneStringNames::get_singleton()->exit_tree, this, SceneStringNames::get_singleton()->_body_exit_tree);
|
||||||
|
|
@ -254,7 +257,10 @@ 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);
|
||||||
|
|
||||||
node->disconnect(SceneStringNames::get_singleton()->enter_tree, this, SceneStringNames::get_singleton()->_area_enter_tree);
|
node->disconnect(SceneStringNames::get_singleton()->enter_tree, this, SceneStringNames::get_singleton()->_area_enter_tree);
|
||||||
node->disconnect(SceneStringNames::get_singleton()->exit_tree, this, SceneStringNames::get_singleton()->_area_exit_tree);
|
node->disconnect(SceneStringNames::get_singleton()->exit_tree, this, SceneStringNames::get_singleton()->_area_exit_tree);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue