summaryrefslogtreecommitdiff
path: root/modules/mono/glue/Managed/Files/NodePath.cs
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-11-18 12:40:54 +0100
committerGitHub <noreply@github.com>2019-11-18 12:40:54 +0100
commitab813531556dfce4177b5bedec866c23fadbd612 (patch)
tree25cb6e2a357f93806767caedfd4eccf08450bb56 /modules/mono/glue/Managed/Files/NodePath.cs
parent84761ca106df2ae9d06116cc5237524438ebad76 (diff)
parent008769aee9ccacdf5098a1088fcd6cfd52c0644d (diff)
Merge pull request #33703 from neikeq/issue-32899
C#: Throw NullReferenceException for null NodePath/RID params
Diffstat (limited to 'modules/mono/glue/Managed/Files/NodePath.cs')
-rw-r--r--modules/mono/glue/Managed/Files/NodePath.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/mono/glue/Managed/Files/NodePath.cs b/modules/mono/glue/Managed/Files/NodePath.cs
index 4de4e1e6a9..8c5872ba5a 100644
--- a/modules/mono/glue/Managed/Files/NodePath.cs
+++ b/modules/mono/glue/Managed/Files/NodePath.cs
@@ -12,7 +12,7 @@ namespace Godot
internal static IntPtr GetPtr(NodePath instance)
{
if (instance == null)
- return IntPtr.Zero;
+ throw new NullReferenceException($"The instance of type {nameof(NodePath)} is null.");
if (instance.disposed)
throw new ObjectDisposedException(instance.GetType().FullName);