aboutsummaryrefslogtreecommitdiffstats
path: root/src/bindings
diff options
context:
space:
mode:
authorLauro Moura <lauromoura@expertisesolutions.com.br>2019-04-02 16:47:36 +0200
committerXavi Artigas <xavierartigas@yahoo.es>2019-04-02 16:48:39 +0200
commit731db8b64403c06c36a27c6a73b13c4b04a9aacd (patch)
treee6b15b341753611f62f8fc46bf6689da5c18cbcf /src/bindings
parentremove useless check of ws2tcpip.h (diff)
downloadefl-731db8b64403c06c36a27c6a73b13c4b04a9aacd.tar.gz
csharp: Raise exception when Array is null.
Reviewers: felipealmeida, vitor.sousa, segfaultxavi Reviewed By: vitor.sousa Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8499
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;