There can be an empty shared ptr. It is totally valid.
This commit is contained in:
Родитель
e71c512ef8
Коммит
db7397e72e
|
@ -393,7 +393,7 @@ function __embind_register_smart_ptr(
|
||||||
};
|
};
|
||||||
|
|
||||||
Handle.prototype['delete'] = function() {
|
Handle.prototype['delete'] = function() {
|
||||||
if (!this.ptr) {
|
if (!this.ptr && !this.smartPointer) {
|
||||||
throw new BindingError(pointeeType.name + ' instance already deleted');
|
throw new BindingError(pointeeType.name + ' instance already deleted');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче