GetMacroIcons(table) will (sometimes?) populate numbers in the table instead of string for texture file path.
And we need to use texture:SetToFileData() for numbers instead of texture:SetTexture() like below:
Code:
texture = GetSpellorMacroIconInfo(index);
if(type(texture) == "number") then
macroPopupIcon:SetToFileData(texture);
else
macroPopupIcon:SetTexture("INTERFACE\\ICONS\\"..texture);
end
Where GetSpellorMacroIconInfo is returning values populated by GetMacroIcons()