diff --git a/src/embind/embind.js b/src/embind/embind.js index 5c3238314..e9c92f5e4 100644 --- a/src/embind/embind.js +++ b/src/embind/embind.js @@ -393,7 +393,7 @@ function __embind_register_smart_ptr( }; Handle.prototype['delete'] = function() { - if (!this.ptr) { + if (!this.ptr && !this.smartPointer) { throw new BindingError(pointeeType.name + ' instance already deleted'); }