Skip to content

Commit

Permalink
Fixed nil pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
mjwhitta committed Jan 23, 2023
1 parent 292dc03 commit 288297e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion art/art.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@ func (a *Art) String() string {
var top string

if a.Name == "" {
return a.SysInfo.String()
if a.SysInfo != nil {
return a.SysInfo.String()
}

return ""
}

if len(a.Pixels) > 0 {
Expand Down
2 changes: 1 addition & 1 deletion globals.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ var Cache *cache.ArtCache = cache.New(Version)
var devRegex = regexp.MustCompile(`<a href.+>(.+)</a>`)

// Version is the package version
const Version = "1.4.0"
const Version = "1.4.1"

0 comments on commit 288297e

Please sign in to comment.