소스 검색

Checking if DatFile is in incorrect state in DatFile::SetLocale()

Ivan Arkhipov 7 년 전
부모
커밋
0b361604ae
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      src/DatFile.cpp

+ 4 - 0
src/DatFile.cpp

@@ -667,6 +667,10 @@ namespace LOTRO_DAT {
 
     void DatFile::SetLocale(LOCALE locale) {
         try {
+            if (dat_state_ < READY) {
+                fprintf(stderr, "Bad DatFile::SetLocale() - DatFile is in incorrect state... Cannot set locale\n");
+                return;
+            }
             if (current_locale_ == locale) {
                 return;
             }