diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-11-27 02:51:36 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-11-27 02:51:36 +0900 |
| commit | 91efeb101a00b7d85843c5b609349d6781c4e4a4 (patch) | |
| tree | dc35cb7031220a9b9242f26014115ce011a4a332 | |
| parent | dcb22a61c00aa4a09ab31cb47380f55ae9ad1b0d (diff) | |
internal/pipewire: spa_dict size nil check
This fixes serialisation of NULL spa_dict.
Signed-off-by: Ophestra <cat@gensokyo.uk>
| -rw-r--r-- | internal/pipewire/pod.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/pipewire/pod.go b/internal/pipewire/pod.go index 27d3c601..2e04f446 100644 --- a/internal/pipewire/pod.go +++ b/internal/pipewire/pod.go @@ -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 { |
