files: prevent dereferencing a possible (although very unlikely) NULL

Don't catch the NULL earlier, because we do want an error message when
opening the lockfile fails.
1 file changed