summaryrefslogtreecommitdiff
path: root/core/io/resource.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/io/resource.cpp')
-rw-r--r--core/io/resource.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/io/resource.cpp b/core/io/resource.cpp
index 4a94c17132..ad01eb1083 100644
--- a/core/io/resource.cpp
+++ b/core/io/resource.cpp
@@ -317,8 +317,8 @@ void Resource::unregister_owner(Object *p_owner) {
}
void Resource::notify_change_to_owners() {
- for (RBSet<ObjectID>::Element *E = owners.front(); E; E = E->next()) {
- Object *obj = ObjectDB::get_instance(E->get());
+ for (const ObjectID &E : owners) {
+ Object *obj = ObjectDB::get_instance(E);
ERR_CONTINUE_MSG(!obj, "Object was deleted, while still owning a resource."); //wtf
//TODO store string
obj->call("resource_changed", Ref<Resource>(this));