mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-01 05:48:26 +00:00
Bug #81352 --> fix a crash in SetContentType by checking for an emtpy xpidl string.
r/sr=sspitzer
This commit is contained in:
parent
9e1e00caf1
commit
ce9a86a96e
@ -521,10 +521,11 @@ nsresult nsBinHexDecoder::SetContentType(nsIRequest * aRequest, const char * fil
|
||||
if (url)
|
||||
{
|
||||
nsXPIDLCString fileExt;
|
||||
url->GetFileExtension(getter_Copies(fileExt));
|
||||
if (*(fileExt.get()))
|
||||
rv = url->GetFileExtension(getter_Copies(fileExt));
|
||||
if (NS_SUCCEEDED(rv) && *(fileExt.get()))
|
||||
{
|
||||
mimeService->GetTypeFromExtension(fileExt, getter_Copies(contentType));
|
||||
rv = mimeService->GetTypeFromExtension(fileExt, getter_Copies(contentType));
|
||||
if (NS_SUCCEEDED(rv) && *(contentType.get()))
|
||||
mContentType = contentType;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user