Skip to content

Commit 3144457

Browse files
committed
fix: check for nil pointers in PageLog comparison
1 parent 0d45881 commit 3144457

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

internal/model/page_log.go

+6
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ func (l PageLog) Equals(other interface{}) bool {
7474
if !ok {
7575
return false
7676
}
77+
if l.Log == nil || otherLog.Log == nil {
78+
return false
79+
}
80+
if l.Timestamps == nil || otherLog.Timestamps == nil {
81+
return false
82+
}
7783
return l.Log.LineBuffer.Content() == otherLog.Log.LineBuffer.Content() && l.Timestamps.Full == otherLog.Timestamps.Full
7884
}
7985

0 commit comments

Comments
 (0)