diff options
author | Chad Austin <chad@imvu.com> | 2013-03-07 17:30:06 -0800 |
---|---|---|
committer | Jukka Jylänki <jujjyl@gmail.com> | 2013-04-12 14:25:17 +0300 |
commit | 6a14788d73acac51770fd68d63cb8c5531efdfb2 (patch) | |
tree | 10403e6b59a5f82993e978df96c44cee31657e16 /src | |
parent | e7faeb6d50e26e74d21cc06b7eae8929752f4526 (diff) |
It is illegal to pass null as a by-value argument.
Diffstat (limited to 'src')
-rwxr-xr-x | src/embind/embind.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/embind/embind.js b/src/embind/embind.js index 83c3841f..ed659a2b 100755 --- a/src/embind/embind.js +++ b/src/embind/embind.js @@ -491,6 +491,10 @@ RegisteredPointer.prototype.isPolymorphic = function() { RegisteredPointer.prototype.toWireType = function(destructors, handle) { var fromRawType; if (handle === null) { + if (this.pointeeType === this) { + throwBindingError('null is not a valid ' + this.name); + } + if (this.isSmartPointer) { var ptr = this.rawConstructor(0, 0); destructors.push(this.rawDestructor, ptr); |