summaryrefslogtreecommitdiff
path: root/src/session.c
diff options
context:
space:
mode:
authorportix <portix@gmx.net>2011-09-20 12:46:36 +0200
committerportix <portix@gmx.net>2011-09-20 12:46:36 +0200
commit1a8602a230b29263d7e9a19f02257dc1954480d8 (patch)
tree612974e05ab36f04a08648d2bec9a9f059780200 /src/session.c
parentf645dd9a177850bd1bfec78ccaf09c52029a5513 (diff)
downloaddwb-1a8602a230b29263d7e9a19f02257dc1954480d8.zip
Malloc args for the settings-hashtable, CFLAGS + LDFLAGS
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]);