aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/message.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/message.h')
-rw-r--r--src/google/protobuf/message.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/google/protobuf/message.h b/src/google/protobuf/message.h
index 023660c0..007dafa2 100644
--- a/src/google/protobuf/message.h
+++ b/src/google/protobuf/message.h
@@ -1160,7 +1160,7 @@ const T* DynamicCastToGenerated(const Message* from) {
(void)unused;
#ifdef GOOGLE_PROTOBUF_NO_RTTI
- bool ok = &T::default_instance()->GetReflection() == from->GetReflection();
+ bool ok = T::default_instance().GetReflection() == from->GetReflection();
return ok ? down_cast<const T*>(from) : nullptr;
#else
return dynamic_cast<const T*>(from);