Update server-messages.go

Fix nil reference error
This commit is contained in:
Yukinari Toyota 2020-01-17 13:21:09 +09:00 committed by GitHub
parent 1c052273de
commit faa9021021
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -129,7 +129,7 @@ type MsgSetColorMapEntries struct {
}
func (fbm *MsgSetColorMapEntries) CopyTo(r io.Reader, w io.Writer, c common.IClientConn) error {
reader := &common.RfbReadHelper{Reader: r}
reader := common.NewRfbReadHelper(r)
writeTo := &WriteTo{w, "MsgSetColorMapEntries.CopyTo"}
reader.Listeners.AddListener(writeTo)
_, err := fbm.Read(c, reader)