소스 검색

Do not send NOTIFICATION_PREDELETE to scripts, as it can cause problmes in garbage collected languages. Closes #6784

Juan Linietsky 7 년 전
부모
커밋
65cc56c35d
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      core/object.cpp

+ 1 - 1
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);
 	}
 }