aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/embind/embind.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/embind/embind.js b/src/embind/embind.js
index 5aae8669..82b9c5d4 100755
--- a/src/embind/embind.js
+++ b/src/embind/embind.js
@@ -607,13 +607,12 @@ RegisteredPointer.prototype.fromWireTypeAutoDowncast = function(ptr) { // ptr is
}
var toType = this.getDynamicDowncastType(ptr);
if (toType) {
- var fromType = this.pointeeType;
if (this.isSmartPointer) {
handle = toType.smartPointerType.fromWireType(ptr);
} else {
handle = toType.fromWireType(ptr);
}
- handle.$$.ptr = staticPointerCast(handle.$$.ptr, fromType.rawType, toType.rawType);
+ handle.$$.ptr = staticPointerCast(handle.$$.ptr, this.pointeeType.rawType, toType.rawType);
} else {
handle = this.fromWireType(ptr);
}