Skip to content

Commit 434e09a

Browse files
kjkclaude
andcommitted
fix crash in SetCurrentLangByCode when translations resource is null
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
1 parent fedbfb9 commit 434e09a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Translations.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,9 @@ void SetCurrentLangByCode(const char* langCode) {
187187
return;
188188
}
189189
StrSpan d = LoadDataResource(2);
190+
if (d.IsEmpty()) {
191+
return;
192+
}
190193
ParseTranslationsTxt(d, langCode);
191194
str::Free(d);
192195
}

0 commit comments

Comments
 (0)