Metal: Don't crash on invalid shaders

MetalFunctionData::function was uninitialized when an error happened
its destructor would run, calling release on a garbage pointer.

Bug:

Change-Id: Ib72038da2a07b4e0f27ec929ec08f303c54dcc62
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/17760
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/dawn_native/metal/ShaderModuleMTL.h b/src/dawn_native/metal/ShaderModuleMTL.h
index 2e447c1..b270034 100644
--- a/src/dawn_native/metal/ShaderModuleMTL.h
+++ b/src/dawn_native/metal/ShaderModuleMTL.h
@@ -36,7 +36,7 @@
                                                    const ShaderModuleDescriptor* descriptor);
 
         struct MetalFunctionData {
-            id<MTLFunction> function;
+            id<MTLFunction> function = nil;
             MTLSize localWorkgroupSize;
             bool needsStorageBufferLength;
             ~MetalFunctionData() {