buffer: avoid a potential NULL dereference

parent fe20271e
Pipeline #187090 passed with stages
in 9 minutes and 9 seconds