diff --git a/code/__HELPERS/logging.dm b/code/__HELPERS/logging.dm index 5d2427603c7..bf3a5b3ffc9 100644 --- a/code/__HELPERS/logging.dm +++ b/code/__HELPERS/logging.dm @@ -82,8 +82,8 @@ diary << "\[[time_stamp()]]MISC: [text][log_end]" /proc/log_to_dd(text) - world.log << text //this comes before the config check because it can't possibly runtime - if(config.log_world_output) + world.log << text + if(config && config.log_world_output) diary << "\[[time_stamp()]]DD_OUTPUT: [text][log_end]" /** diff --git a/code/modules/error_handler/error_viewer.dm b/code/modules/error_handler/error_viewer.dm index 1b8bd092ee2..9bbab68b637 100644 --- a/code/modules/error_handler/error_viewer.dm +++ b/code/modules/error_handler/error_viewer.dm @@ -112,7 +112,8 @@ var/global/datum/ErrorViewer/ErrorCache/error_cache = null // Show the error to admins with debug messages turned on, but only if one // from the same source hasn't been shown too recently - if(error_source.next_message_at <= world.time) + // (Also, make sure config is initialized, or log_debug will runtime) + if(config && error_source.next_message_at <= world.time) var/const/viewtext = "\[view]" // Nesting these in other brackets went poorly log_debug("Runtime in [e.file],[e.line]: [html_encode(e.name)] [error_entry.makeLink(viewtext)]") error_source.next_message_at = world.time + ERROR_MSG_DELAY