Bug 1514605 - fix Thunderbird startup crash when GTK_USE_PORTAL=1 is set. r+a=jorgk
--- a/mail/components/shell/nsGNOMEShellService.cpp
+++ b/mail/components/shell/nsGNOMEShellService.cpp
@@ -207,17 +207,20 @@ bool nsGNOMEShellService::checkDefault(c
if (giovfs) {
handler.Truncate();
nsCOMPtr<nsIHandlerApp> handlerApp;
rv = giovfs->GetAppForURIScheme(nsDependentCString(aProtocols[i]),
getter_AddRefs(handlerApp));
if (NS_FAILED(rv) || !handlerApp) {
return false;
}
- nsCOMPtr<nsIGIOMimeApp> app = do_QueryInterface(handlerApp);
+ nsCOMPtr<nsIGIOMimeApp> app = do_QueryInterface(handlerApp, &rv);
+ if (NS_FAILED(rv) || !app) {
+ return false;
+ }
rv = app->GetCommand(handler);
if (NS_SUCCEEDED(rv) && !CheckHandlerMatchesAppName(handler)) {
return false;
}
}
}
return true;