browser-plugin: Correct check for checking the hostname/protocol

While it's extremely unlikely that document.location would not be an
object in the browser setting, this check is incorrect and we could
possibly crash an NPAPI host if this is the case.

https://bugzilla.gnome.org/show_bug.cgi?id=670489
This commit is contained in:
Jasper St. Pierre 2012-02-20 18:23:12 -05:00
parent c7a4b307af
commit 9400d8f6db

View File

@ -104,7 +104,7 @@ check_origin_and_protocol (NPP instance)
&location)) &location))
goto out; goto out;
if (!NPVARIANT_IS_OBJECT (document)) if (!NPVARIANT_IS_OBJECT (location))
goto out; goto out;
hostname = get_string_property (instance, hostname = get_string_property (instance,