do not add script handler if runtime cannot be initialised

This commit is contained in:
Vincent Sanders 2012-12-13 15:32:34 +00:00
parent 1b4604130e
commit 25e85f1429

View File

@ -38,8 +38,10 @@ void js_initialise(void)
rt = JS_NewRuntime(8L * 1024L * 1024L);
JSLOG("New runtime handle %p", rt);
/* register script content handler */
javascript_init();
if (rt != NULL) {
/* register script content handler */
javascript_init();
}
}
void js_finalise(void)