From 388c6f1ef99f39b857c049a47f281b6569e75aae Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sun, 6 Jun 2021 13:28:09 +0200 Subject: [PATCH] fix:only load lovebird when launched in debug --- sonic-radiance.love/birb/core/debug.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sonic-radiance.love/birb/core/debug.lua b/sonic-radiance.love/birb/core/debug.lua index 372b7f4..ddd423b 100644 --- a/sonic-radiance.love/birb/core/debug.lua +++ b/sonic-radiance.love/birb/core/debug.lua @@ -23,7 +23,7 @@ local DebugSystem = Object:extend() -local lovebird = require "birb.libs.lovebird" +local lovebird local Levels = enum { "ERROR", @@ -38,12 +38,13 @@ function DebugSystem:new(controller) self.debugLevel = self.controller.conf.debugLevel or Levels.INFO self.active = (self.debugLevel == Levels.DEBUG) if (self.active) then + lovebird = require "birb.libs.lovebird" lovebird.update() end end function DebugSystem:update(dt) - if (self.active) then + if (self.active and lovebird ~= nil) then lovebird.update(dt) end end