Bug 593106 - attempt to work around a strange behavior where some string is null which should never be null, r=Mossop a=blocker

This commit is contained in:
Benjamin Smedberg 2010-09-16 09:50:37 -07:00
Родитель 86125b1d23
Коммит 34ac912694
1 изменённых файлов: 3 добавлений и 4 удалений

Просмотреть файл

@ -610,18 +610,17 @@ nsCommandLine::EnumerateHandlers(EnumerateHandlersCallback aCallback, void *aClo
while (NS_SUCCEEDED(strenum->HasMore(&hasMore)) && hasMore) {
strenum->GetNext(entry);
nsXPIDLCString contractID;
nsCString contractID;
rv = catman->GetCategoryEntry("command-line-handler",
entry.get(),
getter_Copies(contractID));
if (!contractID)
if (NS_FAILED(rv))
continue;
nsCOMPtr<nsICommandLineHandler> clh(do_GetService(contractID.get()));
if (!clh) {
LogConsoleMessage(NS_LITERAL_STRING("Contract ID '%s' was registered as a command line handler for entry '%s', but could not be created."),
contractID.get(),
entry.get());
contractID.get(), entry.get());
continue;
}