category of logs accessed via log context can be null
in such a case, strcmp will crash
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
if (_doFileFlush)
_logstream->flush();
}
- if (_permanentDeleteLogStream && strcmp(ctx.category, lcPermanentLog().categoryName()) == 0) {
+ if (_permanentDeleteLogStream && ctx.category && strcmp(ctx.category, lcPermanentLog().categoryName()) == 0) {
(*_permanentDeleteLogStream) << msg << "\n";
_permanentDeleteLogStream->flush();
if (_permanentDeleteLogFile.size() > 10LL * 1024LL) {