Add missing nullptr check.
Tests needed.
PiperOrigin-RevId: 409380655
diff --git a/quic/core/crypto/quic_crypto_server_config.cc b/quic/core/crypto/quic_crypto_server_config.cc
index e2b4b93..fd8041b 100644
--- a/quic/core/crypto/quic_crypto_server_config.cc
+++ b/quic/core/crypto/quic_crypto_server_config.cc
@@ -1787,7 +1787,8 @@
for (const SourceAddressToken& token : source_address_tokens.tokens()) {
reason = ValidateSingleSourceAddressToken(token, ip, now);
if (reason == HANDSHAKE_OK) {
- if (token.has_cached_network_parameters()) {
+ if (cached_network_params != nullptr &&
+ token.has_cached_network_parameters()) {
*cached_network_params = token.cached_network_parameters();
}
break;