aboutsummaryrefslogtreecommitdiffstats
path: root/src/bindings
diff options
context:
space:
mode:
Diffstat (limited to 'src/bindings')
-rw-r--r--src/bindings/mono/eina_mono/eina_array.cs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/bindings/mono/eina_mono/eina_array.cs b/src/bindings/mono/eina_mono/eina_array.cs
index f4dd49d69e..b2cdede565 100644
--- a/src/bindings/mono/eina_mono/eina_array.cs
+++ b/src/bindings/mono/eina_mono/eina_array.cs
@@ -99,6 +99,11 @@ public class Array<T> : IEnumerable<T>, IDisposable
public Array(IntPtr handle, bool own)
{
+ if (handle == IntPtr.Zero)
+ {
+ throw new ArgumentNullException("Handle can't be null");
+ }
+
Handle = handle;
Own = own;
OwnContent = own;
@@ -106,6 +111,11 @@ public class Array<T> : IEnumerable<T>, IDisposable
public Array(IntPtr handle, bool own, bool ownContent)
{
+ if (handle == IntPtr.Zero)
+ {
+ throw new ArgumentNullException("Handle can't be null");
+ }
+
Handle = handle;
Own = own;
OwnContent = ownContent;