summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/tab-body.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/tab-body.c b/src/tab-body.c
index 1bdcebb..54bbd17 100644
--- a/src/tab-body.c
+++ b/src/tab-body.c
@@ -488,14 +488,15 @@ mq_tab_body_new(MqTab *tab, const gchar *uri)
mq_application_get_webkit_settings(
mq_tab_get_application(tab))));
- if (uri && g_str_has_prefix(uri, "about:")) {
- rw_uri = g_strconcat("mq-about:", uri + strlen("about:"), NULL);
- } else {
- rw_uri = g_strdup(uri);
- }
- if (rw_uri) {
- webkit_web_view_load_uri(body->web_view, rw_uri);
- g_free(rw_uri);
+ if (uri) {
+ if (g_str_has_prefix(uri, "about:")) {
+ rw_uri = g_strconcat("mq-about:",
+ uri + strlen("about:"), NULL);
+ webkit_web_view_load_uri(body->web_view, rw_uri);
+ g_free(rw_uri);
+ } else {
+ webkit_web_view_load_uri(body->web_view, uri);
+ }
}
body->container = GTK_WIDGET(body->web_view);