summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-11-13 13:36:09 -0300
committerJuan Linietsky <reduzio@gmail.com>2017-11-13 13:36:57 -0300
commit65cc56c35da357ac7799ed9616aba4898f17f232 (patch)
tree89326f98df9bca0c3f8da9dba74e707cf2762d94
parent390e957ba4bbe1683915a5de21f9082f84f3ebe0 (diff)
Do not send NOTIFICATION_PREDELETE to scripts, as it can cause problmes in garbage collected languages. Closes #6784
-rw-r--r--core/object.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/object.cpp b/core/object.cpp
index 823cbe14d4..4284266f20 100644
--- a/core/object.cpp
+++ b/core/object.cpp
@@ -848,7 +848,7 @@ void Object::notification(int p_notification, bool p_reversed) {
_notificationv(p_notification, p_reversed);
- if (script_instance) {
+ if (script_instance && p_notification != NOTIFICATION_PREDELETE) {
script_instance->notification(p_notification);
}
}