diff --git a/src/kits/tracker/Utilities.cpp b/src/kits/tracker/Utilities.cpp index daf6ab62ad..cb9cc6cb2a 100644 --- a/src/kits/tracker/Utilities.cpp +++ b/src/kits/tracker/Utilities.cpp @@ -1519,19 +1519,19 @@ GetLocalizedFileName(entry_ref& ref, BString& localizedFileName, bool traverse) char* signature = attribute; char* context = strchr(signature, ':'); - if (context != NULL) { - context[0] = '\0'; - context++; - } else + if (context == NULL) return B_ENTRY_NOT_FOUND; + context[0] = '\0'; + context++; + char* string = strchr(context, ':'); - if (string != NULL) { - string[0] = '\0'; - string++; - } else + if (string == NULL) return B_ENTRY_NOT_FOUND; + string[0] = '\0'; + string++; + BCatalog catalog(signature); const char* temp = catalog.GetString(string, context);