unitframes: check for RegisterStateDriver before using

This fixes a compatibility issue with NotGrid, which is
adding a :SetAttribute() function to all frames.
This commit is contained in:
shagu
2019-06-11 17:34:28 +02:00
parent d779f20d6b
commit fe479d1f77
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -769,7 +769,7 @@ function pfUI.uf:EnableScripts()
local f = self
-- handle secure unit button templates (> vanilla)
if f.SetAttribute then
if f.SetAttribute and RegisterStateDriver then
f.showmenu = pfUI.uf.RightClickAction
f:SetAttribute("unit", f.label .. f.id)
f:SetAttribute("type1", "target")