aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/embind/embind.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/embind/embind.js b/src/embind/embind.js
index 742dbb94..5a49d177 100755
--- a/src/embind/embind.js
+++ b/src/embind/embind.js
@@ -773,6 +773,9 @@ function __embind_register_class(
throw new BindingError("Use 'new' to construct " + name);
}
var body = type.constructor.body;
+ if (undefined === body) {
+ throw new BindingError(name + " has no accessible constructor");
+ }
return body.apply(this, arguments);
});
type.constructor.prototype = type.Handle.prototype;