Explorar o código

fix for getLocale() returning null

Nicolas Cannasse %!s(int64=6) %!d(string=hai) anos
pai
achega
e42d2a9d0c
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      hxd/System.hl.hx

+ 1 - 0
hxd/System.hl.hx

@@ -288,6 +288,7 @@ class System {
 	static function get_lang() : String {
 		if( _lang == null ) {
 			var str = @:privateAccess Sys.makePath(getLocale());
+			if( str == null ) str = "en";
 			_lang = ~/[.@_-]/g.split(str)[0];
 		}
 		return _lang;