Index: src/OFLocalization.m ================================================================== --- src/OFLocalization.m +++ src/OFLocalization.m @@ -23,10 +23,11 @@ #import "OFArray.h" #import "OFDictionary.h" #import "OFInvalidArgumentException.h" #import "OFInvalidEncodingException.h" +#import "OFOpenItemFailedException.h" #ifdef OF_MORPHOS # define BOOL EXEC_BOOL # include # include @@ -247,11 +248,16 @@ return; pool = objc_autoreleasePoolPush(); mapPath = [path stringByAppendingPathComponent: @"languages.json"]; - map = [[OFString stringWithContentsOfFile: mapPath] JSONValue]; + @try { + map = [[OFString stringWithContentsOfFile: mapPath] JSONValue]; + } @catch (OFOpenItemFailedException *e) { + objc_autoreleasePoolPop(pool); + return; + } language = [_language lowercaseString]; territory = [_territory lowercaseString]; if (territory == nil)