aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/embind/embind.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/embind/embind.js b/src/embind/embind.js
index 5a49d177..277515a5 100755
--- a/src/embind/embind.js
+++ b/src/embind/embind.js
@@ -619,7 +619,7 @@ RegisteredPointer.prototype.getDynamicDowncastType = function(ptr) {
var derivation = Module.__getDerivationPath(type, this.pointeeType.rawType);
for (var i = 0; i < derivation.size(); i++) {
downcastType = typeRegistry[derivation.at(i)];
- if (downcastType) {
+ if (downcastType && (!this.isSmartPointer || downcastType.smartPointerType)) {
break;
}
}