diff --git a/extensions/wallet/src/wallet.cpp b/extensions/wallet/src/wallet.cpp index 8fe558b794bc..8696c973d8b4 100644 --- a/extensions/wallet/src/wallet.cpp +++ b/extensions/wallet/src/wallet.cpp @@ -1958,7 +1958,10 @@ wallet_InitializeCurrentURL(nsIDocument * doc) { #else const char* host; #endif - url->GetHost(&host); + nsresult rv = url->GetHost(&host); + if (NS_FAILED(rv)) { + return; + } nsAutoString urlName = nsAutoString(host); #ifdef NECKO nsCRT::free(host);