aboutsummaryrefslogtreecommitdiff
path: root/engines/tinsel/strres.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/tinsel/strres.cpp')
-rw-r--r--engines/tinsel/strres.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/engines/tinsel/strres.cpp b/engines/tinsel/strres.cpp
index 8f9f72f446..2416d6a8fa 100644
--- a/engines/tinsel/strres.cpp
+++ b/engines/tinsel/strres.cpp
@@ -88,11 +88,9 @@ void ChangeLanguage(LANGUAGE newLang) {
textLanguage = newLang;
sampleLanguage = newLang;
- if (textBuffer) {
- // free the previous buffer
- free(textBuffer);
- textBuffer = NULL;
- }
+ // free the previous buffer
+ free(textBuffer);
+ textBuffer = NULL;
// Try and open the specified language file. If it fails, and the language
// isn't English, try falling back on opening 'english.txt' - some foreign
@@ -355,10 +353,8 @@ int SubStringCount(int id) {
void FreeTextBuffer() {
- if (textBuffer) {
- free(textBuffer);
- textBuffer = NULL;
- }
+ free(textBuffer);
+ textBuffer = NULL;
}
/**