diff options
author | Jan-Michael Brummer <jan.brummer@tabos.org> | 2021-02-02 17:52:53 +0100 |
---|---|---|
committer | Jan-Michael Brummer <jan.brummer@tabos.org> | 2021-02-02 19:40:44 +0100 |
commit | a0897660671e681fa6c24725f2307b137cf1501e (patch) | |
tree | 80381d1aa02bb90f48de56c203cc5ae17ce23f33 /src/webextension/ephy-web-extension-manager.c | |
parent | bc60c1ba1d8fc12a3003a237f45644442b0d3704 (diff) | |
download | epiphany-a0897660671e681fa6c24725f2307b137cf1501e.tar.gz |
Fix webextension critical message
Fixes ** (epiphany:25129): CRITICAL **: 17:34:25.183: WebKitUserScript* webkit_user_script_new_for_world(const gchar*, WebKitUserContentInjectedFrames, WebKitUserScriptInjectionTime, const char*, const gchar* const*, const gchar* const*): assertion 'source' failed
Diffstat (limited to 'src/webextension/ephy-web-extension-manager.c')
-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, |