summaryrefslogtreecommitdiff
path: root/modules/mono/glue/Managed/Files/Dictionary.cs
diff options
context:
space:
mode:
authorIgnacio Etcheverry <neikeq@users.noreply.github.com>2019-02-19 01:02:20 +0100
committerGitHub <noreply@github.com>2019-02-19 01:02:20 +0100
commit29fd942dd6e6851014da8d3da9a7fcdca2921781 (patch)
treed73add68409b89abc479997c2836403a8b0ff336 /modules/mono/glue/Managed/Files/Dictionary.cs
parente1f01bf2ac8ed0fb89a3f42a64529ddf0114fbf5 (diff)
parentefd5d4bcf9fc15a92ef40e3f6edb185d190cd50e (diff)
Merge pull request #26039 from neikeq/throw_objectdisposedexception
C#: Throw ObjectDisposedException from disposed wrapper classes
Diffstat (limited to 'modules/mono/glue/Managed/Files/Dictionary.cs')
-rw-r--r--modules/mono/glue/Managed/Files/Dictionary.cs3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/mono/glue/Managed/Files/Dictionary.cs b/modules/mono/glue/Managed/Files/Dictionary.cs
index 7695f03cd6..fb4521065f 100644
--- a/modules/mono/glue/Managed/Files/Dictionary.cs
+++ b/modules/mono/glue/Managed/Files/Dictionary.cs
@@ -54,6 +54,9 @@ namespace Godot.Collections
internal IntPtr GetPtr()
{
+ if (disposed)
+ throw new ObjectDisposedException(GetType().FullName);
+
return safeHandle.DangerousGetHandle();
}