From fc6502a69f97e4e27c54be35845b20eee978b8bd Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Sun, 26 Dec 2010 13:58:57 +0000 Subject: [PATCH] Fix CID-10337 (unreachable code): * only return the catalog if it isn't NULL, thus allowing the loop to potentially increase the loop var - in turn making code reachable that wasn't before git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39942 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/locale/MutableLocaleRoster.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/kits/locale/MutableLocaleRoster.cpp b/src/kits/locale/MutableLocaleRoster.cpp index ae4ff709cf..53784b6924 100644 --- a/src/kits/locale/MutableLocaleRoster.cpp +++ b/src/kits/locale/MutableLocaleRoster.cpp @@ -814,7 +814,8 @@ MutableLocaleRoster::LoadCatalog(const char* signature, const char* language, currCatalog = nextCatalog; } } - return catalog; + if (catalog != NULL) + return catalog; } info->UnloadIfPossible(); }