summaryrefslogtreecommitdiff
path: root/src/journal
diff options
context:
space:
mode:
Diffstat (limited to 'src/journal')
-rw-r--r--src/journal/journal-file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
index c468b22697..83f603ac82 100644
--- a/src/journal/journal-file.c
+++ b/src/journal/journal-file.c
@@ -1300,7 +1300,7 @@ static int generic_array_bisect_plus_one(JournalFile *f,
r = generic_array_bisect(f, first, n-1, needle, test_object, direction, ret, offset, idx);
- if (r > 0)
+ if (r > 0 && idx)
(*idx) ++;
return r;