MediaLibrary: Set logger before acquiring file lock
File locking will attempt to log on failure (ie: the medialib is already
locked).
As fc002ae1 removed s_logger
null
checking, logging before constructing MediaLibrary
dereferences
nullptr.
Merge request reports
Activity
added 9 commits
-
050c7d07...9994f1c9 - 8 commits from branch
videolan:master
- 4ed3595b - MediaLibrary: Set logger before acquiring file lock
-
050c7d07...9994f1c9 - 8 commits from branch
changed milestone to %0.12.x
assigned to @chouquette
enabled an automatic merge when the pipeline for 4ed3595b succeeds
- Resolved by Alaric Senat
I was too quick to approve, most tests don't use the
MediaLibrary::create
"factory". With your change, most tests end up using anullptr
logger instance.If there was only the
MediaLibrary
class involved, the correct fix would probably be to make the constructor private to enforce thecreate
factory function to be used, but there are other media library classes in the context of tests, so that won't work, or it will require a bit of code duplication...If I'm being honest, I'm not sure what the best way to achieve what you want is :/
mentioned in commit asenat/medialibrary@9969d938
- Resolved by Hugo Beauzée-Luyssen
mentioned in commit asenat/medialibrary@98706459
- Resolved by Alaric Senat
- Resolved by Alaric Senat
added 30 commits
-
3e54bf76...5a3fa473 - 28 commits from branch
videolan:master
- c04a18f9 - tests: Set logger globally in all test cases
- 974fe366 - MediaLibrary: Set logger before acquiring file lock
-
3e54bf76...5a3fa473 - 28 commits from branch