diff --git a/js/src/jsexn.c b/js/src/jsexn.c index 09d10a29aa6..74030db63ae 100644 --- a/js/src/jsexn.c +++ b/js/src/jsexn.c @@ -909,7 +909,7 @@ js_GetLocalizedErrorMessage(JSContext* cx, void *userRef, const char *locale, co { const JSErrorFormatString *errorString = NULL; - if (cx->localeCallbacks) { + if (cx->localeCallbacks && cx->localeCallbacks->localeGetErrorMessage) { errorString = cx->localeCallbacks ->localeGetErrorMessage(userRef, locale, errorNumber); }