diff --git a/ipc/glue/BackgroundUtils.cpp b/ipc/glue/BackgroundUtils.cpp index 5b4feea6b058..65753972ac4c 100644 --- a/ipc/glue/BackgroundUtils.cpp +++ b/ipc/glue/BackgroundUtils.cpp @@ -129,6 +129,10 @@ PrincipalToPrincipalInfo(nsIPrincipal* aPrincipal, return rv; } + if (NS_WARN_IF(!uri)) { + return NS_ERROR_FAILURE; + } + nsCString spec; rv = uri->GetSpec(spec); if (NS_WARN_IF(NS_FAILED(rv))) {