summaryrefslogtreecommitdiff
path: root/desktop/browser.c
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2003-04-25 08:03:15 +0000
committerJames Bursa <james@netsurf-browser.org>2003-04-25 08:03:15 +0000
commit0285c2984fc1913d583432716d6fff4f9f291994 (patch)
tree2bc779ca5e62489de76e4a59ea470e94080c0621 /desktop/browser.c
parent58c28f9c1ab86da14f15cee44ae936c74d812a5f (diff)
downloadnetsurf-0285c2984fc1913d583432716d6fff4f9f291994.tar.gz
netsurf-0285c2984fc1913d583432716d6fff4f9f291994.tar.bz2
[project @ 2003-04-25 08:03:15 by bursa]
Various memory fixes. svn path=/import/netsurf/; revision=128
Diffstat (limited to 'desktop/browser.c')
-rw-r--r--desktop/browser.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/desktop/browser.c b/desktop/browser.c
index 32c9bc659..0a9c674ac 100644
--- a/desktop/browser.c
+++ b/desktop/browser.c
@@ -1,5 +1,5 @@
/**
- * $Id: browser.c,v 1.34 2003/04/15 17:53:00 bursa Exp $
+ * $Id: browser.c,v 1.35 2003/04/25 08:03:15 bursa Exp $
*/
#include "netsurf/content/cache.h"
@@ -76,7 +76,9 @@ struct history* history_create(char* desc, char* url)
{
struct history* h = xcalloc(1, sizeof(struct history));
LOG(("desc = %s, url = %s", desc, url));
- h->description = xstrdup(desc);
+ h->description = 0;
+ if (desc != 0)
+ h->description = xstrdup(desc);
h->url = xstrdup(url);
LOG(("return h = %p", h));
return h;