Skip to content

Commit 83dc35e

Browse files
authored
Merge pull request #2367 from square/juho/fix-npe-in-fds-gen
fix: options entries can be null for files imported from external jars
2 parents d9edb0e + 16ecb87 commit 83dc35e

File tree

1 file changed

+1
-1
lines changed
  • wire-library/wire-schema/src/commonMain/kotlin/com/squareup/wire/schema

1 file changed

+1
-1
lines changed

wire-library/wire-schema/src/commonMain/kotlin/com/squareup/wire/schema/Options.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class Options(
3838
}
3939

4040
val map: Map<ProtoMember, Any?>
41-
get() = entries!!.toMap()
41+
get() = entries?.toMap() ?: emptyMap()
4242

4343
fun retainLinked() = Options(optionType, emptyList())
4444

0 commit comments

Comments
 (0)