summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher James Halse Rogers <chalserogers@gmail.com>2007-09-23 18:33:25 +1000
committerChristopher James Halse Rogers <chalserogers@gmail.com>2007-09-23 18:33:25 +1000
commit3beb80eeb266cdf2f452b8e64a49bbdd6557fe76 (patch)
treebd1be803c279d61f3523c193552476c12f18e599
parent7b5ed23271646a43d8b4064d21960a161b2a21d6 (diff)
downloadsession-xdg-3beb80eeb266cdf2f452b8e64a49bbdd6557fe76.tar.gz
session-xdg-3beb80eeb266cdf2f452b8e64a49bbdd6557fe76.tar.bz2
Fix segfault on startup when no previous session ID specified
It is important to remember that pointers are not initialised to NULL automatically!
-rw-r--r--session.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/session.c b/session.c
index b5dd618..6c4bb14 100644
--- a/session.c
+++ b/session.c
@@ -807,8 +807,8 @@ static int
sessionInitDisplay (CompPlugin *p, CompDisplay *d)
{
SessionDisplay *sd;
- char *previousId;
int i;
+ char *previousId = NULL;
sd = malloc (sizeof (SessionDisplay));
if (!sd)