From fe479d1f77c8bca560acd3be3c3096696ca308e1 Mon Sep 17 00:00:00 2001 From: shagu Date: Tue, 11 Jun 2019 17:34:28 +0200 Subject: [PATCH] unitframes: check for RegisterStateDriver before using This fixes a compatibility issue with NotGrid, which is adding a :SetAttribute() function to all frames. --- api/unitframes.lua | 2 +- pfUI-tbc.toc | 2 +- pfUI.toc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/unitframes.lua b/api/unitframes.lua index 32df0540..4aea812a 100644 --- a/api/unitframes.lua +++ b/api/unitframes.lua @@ -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") diff --git a/pfUI-tbc.toc b/pfUI-tbc.toc index de1fc2f5..24ca6c96 100644 --- a/pfUI-tbc.toc +++ b/pfUI-tbc.toc @@ -2,7 +2,7 @@ ## Title: |cff33ffccpf|cffffffffUI |cffaa5555[incomplete] ## Author: Shagu ## Notes: A complete user interface replacement. -## Version: 4.1.0 +## Version: 4.1.1 ## SavedVariables: pfUI_profiles, pfUI_addon_profiles, pfUI_cache ## SavedVariablesPerCharacter: pfUI_config, pfUI_init, pfUI_playerDB diff --git a/pfUI.toc b/pfUI.toc index 69c41a34..223d273e 100644 --- a/pfUI.toc +++ b/pfUI.toc @@ -2,7 +2,7 @@ ## Title: |cff33ffccpf|cffffffffUI ## Author: Shagu ## Notes: A complete user interface replacement. -## Version: 4.1.0 +## Version: 4.1.1 ## SavedVariables: pfUI_profiles, pfUI_addon_profiles, pfUI_cache ## SavedVariablesPerCharacter: pfUI_config, pfUI_init, pfUI_playerDB