diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/webextension/ephy-web-extension-manager.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/webextension/ephy-web-extension-manager.c b/src/webextension/ephy-web-extension-manager.c index 009168dee..bfed03f85 100644 --- a/src/webextension/ephy-web-extension-manager.c +++ b/src/webextension/ephy-web-extension-manager.c @@ -875,10 +875,13 @@ run_background_script (EphyWebExtensionManager *self, base_uri = g_strdup_printf ("webextension://%s/", ephy_web_extension_get_guid (web_extension)); for (unsigned int i = 0; i < scripts->len; i++) { - char *script_file = g_ptr_array_index (scripts, i); + const char *script_file = g_ptr_array_index (scripts, i); g_autofree char *data = NULL; WebKitUserScript *user_script; + if (!script_file) + continue; + data = ephy_web_extension_get_resource_as_string (web_extension, script_file); user_script = webkit_user_script_new_for_world (data, WEBKIT_USER_CONTENT_INJECT_TOP_FRAME, |