diff --git a/CefSharp.Core/Cef.h b/CefSharp.Core/Cef.h
index 48a7f6e32..48c95c070 100644
--- a/CefSharp.Core/Cef.h
+++ b/CefSharp.Core/Cef.h
@@ -763,10 +763,16 @@ namespace CefSharp
/// Returns the mime type for the specified file extension or an empty string if unknown.
static String^ GetMimeType(String^ extension)
{
+ if (extension == nullptr)
+ {
+ throw gcnew ArgumentNullException("extension");
+ }
+
if (extension->StartsWith("."))
{
extension = extension->Substring(1, extension->Length - 1);
}
+
return StringUtils::ToClr(CefGetMimeType(StringUtils::ToNative(extension)));
}
diff --git a/CefSharp/ResourceHandler.cs b/CefSharp/ResourceHandler.cs
index 3bb3afc06..698109385 100644
--- a/CefSharp/ResourceHandler.cs
+++ b/CefSharp/ResourceHandler.cs
@@ -258,7 +258,7 @@ namespace CefSharp
}
///
- /// Gets the resource from the file path specified. Use the
+ /// Gets the resource from the file path specified. Use the Cef.GetMimeType()
/// helper method to lookup the mimeType if required. Uses CefStreamResourceHandler for reading the data
///
/// Location of the file.