muesli / telephant

A lightweight but modern Mastodon client for the desktop
MIT License
190 stars 14 forks source link

nil pointer error #59

Closed stevenroose closed 4 years ago

stevenroose commented 4 years ago

First startup it asked me to authorize and when I entered the servers response with the auth token, it just disappeared. This is what it logs when I try to start it back up:

$ telephant 
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x7cdf17]

goroutine 1 [running, locked to thread]:
github.com/muesli/telephant/accounts/mastodon.(*Account).parseMentions(0xc00009b8c0, 0xc0002aed00, 0x1, 0x4, 0x0, 0x0, 0x0)
    github.com/muesli/telephant/accounts/mastodon/mastodon.go:532 +0xf7
github.com/muesli/telephant/accounts/mastodon.(*Account).handleStatus(0xc00009b8c0, 0xc000357200, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
    github.com/muesli/telephant/accounts/mastodon/mastodon.go:693 +0xb6
github.com/muesli/telephant/accounts/mastodon.(*Account).List(0xc00009b8c0, 0x127d0d2, 0x1, 0xc0002a3260, 0xc000000180, 0x9a09df)
    github.com/muesli/telephant/accounts/mastodon/mastodon.go:391 +0x12c
github.com/muesli/telephant/accounts/mastodon.(*Account).Panes.func3(0xc0002a3260, 0xc4fad0, 0xc0002a3260)
    github.com/muesli/telephant/accounts/mastodon/mastodon.go:184 +0x46
main.setupMastodon(0xc0000aa5a0, 0xf, 0xc0001e6450, 0x2b, 0xc0001e64b0, 0x2b, 0xc0001e6510, 0x2b)
    github.com/muesli/telephant/telephant.go:97 +0x4b8
main.main()
    github.com/muesli/telephant/telephant.go:169 +0x72c
muesli commented 4 years ago

Thanks for the report @stevenroose. Just fixed this in master!