aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/preamble.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/preamble.js b/src/preamble.js
index d0e83469..3c2da6b3 100644
--- a/src/preamble.js
+++ b/src/preamble.js
@@ -251,7 +251,9 @@ Module["ccall"] = ccall;
// Returns the C function with a specified identifier (for C++, you need to do manual name mangling)
function getCFunc(ident) {
try {
- var func = globalScope['Module']['_' + ident]; // closure exported function
+ try {
+ var func = globalScope['Module']['_' + ident]; // closure exported function
+ } catch(e) {}
if (!func) func = eval('_' + ident); // explicit lookup
} catch(e) {
}