When logging don't use `core.status_view` if not yet initialized
This commit is contained in:
parent
862aba0f91
commit
f80a4563be
|
@ -1197,8 +1197,10 @@ function core.custom_log(level, show, backtrace, fmt, ...)
|
|||
local text = string.format(fmt, ...)
|
||||
if show then
|
||||
local s = style.log[level]
|
||||
if core.status_view then
|
||||
core.status_view:show_message(s.icon, s.color, text)
|
||||
end
|
||||
end
|
||||
|
||||
local info = debug.getinfo(2, "Sl")
|
||||
local at = string.format("%s:%d", info.short_src, info.currentline)
|
||||
|
|
Loading…
Reference in New Issue