Fix for logic error in nullable string converter that can cause a crash.

Test: Manual
Change-Id: I10771e6eb45e76b210722c9f8a800a39b0d89bc9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/210494
Reviewed-by: Alex Benton <bentonian@google.com>
Commit-Queue: Alex Benton <bentonian@google.com>
diff --git a/generator/templates/art/structures.cpp b/generator/templates/art/structures.cpp
index 2f6f6f8..2848018 100644
--- a/generator/templates/art/structures.cpp
+++ b/generator/templates/art/structures.cpp
@@ -94,6 +94,7 @@
 void ToNative(JNIContext* c, JNIEnv* env, jstring obj, WGPUStringView* s) {
     if (obj == nullptr) {
         *s = {nullptr, WGPU_STRLEN};
+        return;
     }
     *s = {c->GetStringUTFChars(obj), static_cast<size_t>(env->GetStringUTFLength(obj))};
 }