Author: zooey Date: 2010-12-26 14:58:57 +0100 (Sun, 26 Dec 2010) New Revision: 39942 Changeset: http://dev.haiku-os.org/changeset/39942 Modified: haiku/trunk/src/kits/locale/MutableLocaleRoster.cpp Log: 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 Modified: haiku/trunk/src/kits/locale/MutableLocaleRoster.cpp =================================================================== --- haiku/trunk/src/kits/locale/MutableLocaleRoster.cpp 2010-12-26 06:22:58 UTC (rev 39941) +++ haiku/trunk/src/kits/locale/MutableLocaleRoster.cpp 2010-12-26 13:58:57 UTC (rev 39942) @@ -814,7 +814,8 @@ currCatalog = nextCatalog; } } - return catalog; + if (catalog != NULL) + return catalog; } info->UnloadIfPossible(); }