aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2016-09-14 16:03:17 +0200
committerFlorian Dold <florian.dold@gmail.com>2016-09-14 16:03:17 +0200
commitfca125a0da491e1753d2902d21a672559936922b (patch)
tree69eba84b624d265a7aa68fcf7785b18536d570ea /lib
parentebbdadb4b6bd59e57b0eec8e280c7c5c12453167 (diff)
downloadwallet-core-fca125a0da491e1753d2902d21a672559936922b.tar.xz
fix allocation issue
Diffstat (limited to 'lib')
-rw-r--r--lib/wallet/emscriptif.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/wallet/emscriptif.ts b/lib/wallet/emscriptif.ts
index 34ef4d377..1e5fb0283 100644
--- a/lib/wallet/emscriptif.ts
+++ b/lib/wallet/emscriptif.ts
@@ -198,7 +198,7 @@ abstract class ArenaObject {
}
alloc(size: number) {
- if (this.nativePtr !== undefined) {
+ if (this._nativePtr !== undefined) {
throw Error("Double allocation");
}
this.nativePtr = emscAlloc.malloc(size);
@@ -440,7 +440,7 @@ abstract class PackedArenaObject extends ArenaObject {
}
alloc() {
- super.alloc(this.size());
+ // FIXME: should the client be allowed to call alloc multiple times?
if (!this._nativePtr) {
this.nativePtr = emscAlloc.malloc(this.size());
}