From 06f83663c1f8203c2b22be1f6df1dc58a9524cc1 Mon Sep 17 00:00:00 2001 From: Adam Sutton Date: Wed, 20 Feb 2013 11:18:30 +0000 Subject: [PATCH] timeshift: fix NULL ptr issue --- src/timeshift/timeshift_filemgr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/timeshift/timeshift_filemgr.c b/src/timeshift/timeshift_filemgr.c index 5ce488e0..56a4c2cd 100644 --- a/src/timeshift/timeshift_filemgr.c +++ b/src/timeshift/timeshift_filemgr.c @@ -281,7 +281,8 @@ timeshift_file_t *timeshift_filemgr_get ( timeshift_t *ts, int create ) tsf_tl = tsf_tmp; } - tsf_tl->refcount++; + if (tsf_tl) + tsf_tl->refcount++; return tsf_tl; }