internal/pipewire: spa_dict size nil check

This fixes serialisation of NULL spa_dict.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-11-27 02:51:36 +09:00
parent dcb22a61c0
commit 91efeb101a

View File

@@ -467,6 +467,10 @@ type SPADict struct {
// Size satisfies [KnownSize] with a value computed at runtime.
func (d *SPADict) Size() Word {
if d == nil {
return 0
}
// struct prefix, NItems value
size := SizePrefix + int(Size(SizeInt))
for i := range d.Items {