From 61107aa1f25ca3bf6e3c0cac689bcdd442822d96 Mon Sep 17 00:00:00 2001 From: mappu Date: Wed, 16 Oct 2024 18:05:38 +1300 Subject: [PATCH] genbindings/main: fix an issue with clang crashing leaving behind an invalid cache file --- cmd/genbindings/main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/genbindings/main.go b/cmd/genbindings/main.go index a50ea766..0416bc56 100644 --- a/cmd/genbindings/main.go +++ b/cmd/genbindings/main.go @@ -134,6 +134,10 @@ func main() { panic(err) } + if astInner == nil { + panic("Null in cache file for " + inputHeader) + } + // Convert it to our intermediate format parsed, err := parseHeader(astInner, "") if err != nil {