diff --git a/generator/templates/dawn_wire/WireServer.cpp b/generator/templates/dawn_wire/WireServer.cpp index 833f154cd5..1f4c090cb9 100644 --- a/generator/templates/dawn_wire/WireServer.cpp +++ b/generator/templates/dawn_wire/WireServer.cpp @@ -655,7 +655,7 @@ namespace dawn_wire { m{{type.name.CamelCase()}}IdTable.Remove(data->handle); {% endif %} - if (data->valid) { + if (data->handle != nullptr) { mProcs.{{as_varName(type.name, Name("release"))}}(data->handle); }