record: fix nil pointer in log string

This commit is contained in:
Oliver Gugger committed 2021-09-16 19:51:03 +02:00
1 parent 7d012ae581
commit dd3f3e7ce5
3 files changed
+28 -8

No files matched your search

+4
View File
@@ -102,6 +102,10 @@ func (a *AMP) PayloadSize() uint64 {
// String returns a human-readble description of the amp payload fields.
func (a *AMP) String() string {
if a == nil {
return "<nil>"
}
return fmt.Sprintf("root_share=%x set_id=%x child_index=%d",
a.rootShare, a.setID, a.childIndex)
}