Skip to content

Commit

Permalink
Add Crashlytics log if icons fail to load
Browse files Browse the repository at this point in the history
  • Loading branch information
robbiet480 committed Nov 19, 2017
1 parent ee16432 commit aeed278
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions HomeAssistant/Utilities/Utils.swift
Expand Up @@ -24,6 +24,8 @@ func getIconForIdentifier(_ iconIdentifier: String, iconWidth: Double, iconHeigh
theIcon?.addAttribute(NSAttributedStringKey.foregroundColor.rawValue, value: color)
return theIcon!.image(with: CGSize(width: CGFloat(iconWidth), height: CGFloat(iconHeight)))
} else {
CLSLogv("Error loading Material Design Icons while requesting icon: %@, Width: %f, Height: %f",
getVaList([iconIdentifier, iconWidth, iconHeight]))
return UIImage()
}
}
Expand Down

0 comments on commit aeed278

Please sign in to comment.