MilleXIV / XIV_Databar

19 stars 19 forks source link

When system module disabled, addon tries to set text to fps counter. #35

Closed Amanthuul closed 8 years ago

Amanthuul commented 8 years ago

Every frame pops up this error. If ui errors are disabled, it causes huge fps drop in combat. How to recreate: 1) disable system module 2)reload/relog 3)get in combat

Message: Interface\AddOns\XIV_Databar\modules\system.lua:106: <unnamed>:SetText(): Font not set
Time: 09/02/16 10:03:41
Count: 2935
Stack: [C]: in function `SetText'
Interface\AddOns\XIV_Databar\modules\system.lua:106: in function `UpdateTexts'
Interface\AddOns\XIV_Databar\modules\system.lua:231: in function <Interface\AddOns\XIV_Databar\modules\system.lua:227>

Locals: (*temporary) = <unnamed> {
 0 = <userdata>
}
(*temporary) = "47к/сек"

Also enabling/disabling modules without /reload is very odd.

MilleXIV commented 8 years ago

Fixed. Because of how Blizzard handles Frames it seems it was sticking around after being enabled, which caused the OnUpdate to fire still. I've made it remove the OnUpdate on disable and changed the UpdateTexts function to not do anything if disabled.