From fe79dc90fcfc68720974b272f61ac305116dcb9e Mon Sep 17 00:00:00 2001 From: Angad Kambli Date: Wed, 17 Feb 2021 21:17:57 +0530 Subject: [PATCH] Check parameter validity in `Object::set_script` Fixes #46120. (cherry picked from commit 9c6c2f09e07e65f7819920c4954a7fd54b37d3f6) --- core/object.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/object.cpp b/core/object.cpp index d9d96704b99..46287b000db 100644 --- a/core/object.cpp +++ b/core/object.cpp @@ -1004,14 +1004,16 @@ void Object::set_script(const RefPtr &p_script) { return; } + Ref