summaryrefslogtreecommitdiff
path: root/src/session.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/session.c')
-rw-r--r--src/session.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/session.c b/src/session.c
index ea660a9a..4bd0a258 100644
--- a/src/session.c
+++ b/src/session.c
@@ -91,7 +91,7 @@ session_restore(const char *name) {
}
char **lines = g_strsplit(group, "\n", -1);
WebKitWebView *web, *lastweb = NULL;
- WebKitWebBackForwardList *bf_list;
+ WebKitWebBackForwardList *bf_list = NULL;
int last = 1;
char *uri = NULL;
@@ -108,8 +108,10 @@ session_restore(const char *name) {
}
lastweb = web;
}
- WebKitWebHistoryItem *item = webkit_web_history_item_new_with_data(line[1], line[2]);
- webkit_web_back_forward_list_add_item(bf_list, item);
+ if (bf_list != NULL) {
+ WebKitWebHistoryItem *item = webkit_web_history_item_new_with_data(line[1], line[2]);
+ webkit_web_back_forward_list_add_item(bf_list, item);
+ }
last = current;
FREE(uri);
uri = g_strdup(line[1]);