mirror of
https://github.com/Lime3DS/Lime3DS
synced 2024-12-27 01:22:37 -06:00
Add check if filter is not a nullptr
Fix segfault and pass tests
This commit is contained in:
parent
c4f98c1a2e
commit
2b4998a122
1 changed files with 1 additions and 1 deletions
|
@ -140,7 +140,7 @@ void SetFilter(Filter* new_filter) {
|
||||||
|
|
||||||
void LogMessage(Class log_class, Level log_level, const char* filename, unsigned int line_num,
|
void LogMessage(Class log_class, Level log_level, const char* filename, unsigned int line_num,
|
||||||
const char* function, const char* format, ...) {
|
const char* function, const char* format, ...) {
|
||||||
if (!filter->CheckMessage(log_class, log_level))
|
if (filter != nullptr && !filter->CheckMessage(log_class, log_level))
|
||||||
return;
|
return;
|
||||||
std::array<char, 4 * 1024> formatting_buffer;
|
std::array<char, 4 * 1024> formatting_buffer;
|
||||||
va_list args;
|
va_list args;
|
||||||
|
|
Loading…
Reference in a new issue