summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/backup.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/backup.c')
-rw-r--r--lib/libalpm/backup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libalpm/backup.c b/lib/libalpm/backup.c
index 0334042c..becc7be9 100644
--- a/lib/libalpm/backup.c
+++ b/lib/libalpm/backup.c
@@ -40,7 +40,7 @@ int _alpm_split_backup(const char *string, alpm_backup_t **backup)
STRDUP(str, string, return -1);
/* tab delimiter */
- ptr = strchr(str, '\t');
+ ptr = str ? strchr(str, '\t') : NULL;
if(ptr == NULL) {
(*backup)->name = str;
(*backup)->hash = NULL;