From 69b8f168cc3d7777c9a3799536c5031b85ebc821 Mon Sep 17 00:00:00 2001 From: Quietust Date: Fri, 27 Jan 2012 22:01:59 -0600 Subject: [PATCH] Improve Translation::isValid() - make sure world exists --- library/modules/Translation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/modules/Translation.cpp b/library/modules/Translation.cpp index 10dcf8a50..2d44e2144 100644 --- a/library/modules/Translation.cpp +++ b/library/modules/Translation.cpp @@ -49,7 +49,7 @@ using df::global::d_init; bool Translation::IsValid () { - return (world->raws.language.words.size() > 0) && (world->raws.language.translations.size() > 0); + return (world && (world->raws.language.words.size() > 0) && (world->raws.language.translations.size() > 0)); } bool Translation::readName(t_name & name, df::language_name * source)