Rhymen / go-whatsapp

WhatsApp Web API
MIT License
2.05k stars 490 forks source link

SegFault on session not loaded #536

Open NilsIrl opened 3 years ago

NilsIrl commented 3 years ago

The following minimal reproduction segfaults:

package main

import (
    "github.com/Rhymen/go-whatsapp"
    "time"
)

func main() {
    wac, _ := whatsapp.NewConn(60 * time.Second)
    wac.Chats()
}

Although in general in practice this isn't exactly a problem, should a program segfault on this?

rusq commented 3 years ago

Have you tried checking an error? wac might be nil.