From f484e1843c6abf3b5c225a02f94f6de4a3084793 Mon Sep 17 00:00:00 2001 From: shagu Date: Mon, 4 Sep 2017 22:36:11 +0200 Subject: [PATCH] unitframes: fix nil error on focus portraits --- api/unitframes.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/unitframes.lua b/api/unitframes.lua index 5f9fedf4..5294636a 100644 --- a/api/unitframes.lua +++ b/api/unitframes.lua @@ -249,7 +249,7 @@ function pfUI.uf:CreateUnitFrame(unit, id, config, tick) local scan = UnitName(unit) or "" if this.unitname == strlower(scan) then this.label = unit - this.portrait.model.lastUnit = nil + if this.portrait then this.portrait.model.lastUnit = nil end this.instantRefresh = true pfUI.uf:RefreshUnit(this, "all") return