Add check if userdata is null
This commit is contained in:
parent
f8ffb947aa
commit
a406081443
|
@ -987,6 +987,8 @@ G_MODULE_EXPORT void webkit_web_extension_initialize_with_user_data(
|
||||||
WebKitWebExtension *ex, const GVariant *v)
|
WebKitWebExtension *ex, const GVariant *v)
|
||||||
{
|
{
|
||||||
bool enable = true;
|
bool enable = true;
|
||||||
|
if (v)
|
||||||
|
{
|
||||||
const gchar *str = g_variant_get_string((GVariant *)v, NULL);
|
const gchar *str = g_variant_get_string((GVariant *)v, NULL);
|
||||||
if (str)
|
if (str)
|
||||||
{
|
{
|
||||||
|
@ -996,6 +998,7 @@ G_MODULE_EXPORT void webkit_web_extension_initialize_with_user_data(
|
||||||
enable = strcmp(*arg + 8, "true") == 0;
|
enable = strcmp(*arg + 8, "true") == 0;
|
||||||
g_strfreev(args);
|
g_strfreev(args);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (enable)
|
if (enable)
|
||||||
g_signal_connect(ex, "page-created", G_CALLBACK(initex), NULL);
|
g_signal_connect(ex, "page-created", G_CALLBACK(initex), NULL);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user