diff --git a/midori/midori-extension.c b/midori/midori-extension.c index d4244b9c..7927e72f 100644 --- a/midori/midori-extension.c +++ b/midori/midori-extension.c @@ -428,12 +428,12 @@ midori_extension_set_property (GObject* object, { /* Don't show version suffix if it matches the running Midori */ const gchar* version = g_value_get_string (value); - if (g_str_has_suffix (version, MIDORI_VERSION_SUFFIX)) + if (version && g_str_has_suffix (version, MIDORI_VERSION_SUFFIX)) katze_assign (extension->priv->version, g_strndup (version, strlen (version) - strlen (MIDORI_VERSION_SUFFIX))); /* No version suffix at all, must be 0.4.1 or 0.4.1 git */ - else if (!strchr (version, '-') && !strchr (version, '(')) + else if (version && !strchr (version, '-') && !strchr (version, '(')) katze_assign (extension->priv->version, g_strconcat (version, " (0.4.1)", NULL)); else diff --git a/tests/extensions.c b/tests/extensions.c index 911ebf09..16a4848d 100644 --- a/tests/extensions.c +++ b/tests/extensions.c @@ -168,6 +168,7 @@ extension_activate (gconstpointer data) { MidoriApp* app = midori_app_new (); MidoriExtension* extension = MIDORI_EXTENSION (data); + g_object_set (app, "settings", midori_web_settings_new (), NULL); g_signal_emit_by_name (extension, "activate", app); midori_extension_deactivate (extension); g_object_unref (app); diff --git a/tests/properties.c b/tests/properties.c index cd6b61cd..05c1358e 100644 --- a/tests/properties.c +++ b/tests/properties.c @@ -189,6 +189,8 @@ main (int argc, char** argv) { midori_app_setup (argv); + g_object_set_data (G_OBJECT (webkit_get_default_session ()), + "midori-session-initialized", (void*)1); g_test_init (&argc, &argv, NULL); gtk_init_check (&argc, &argv);