From 8dbad6215304b3dff5a0545b2363405b59ab5bcd Mon Sep 17 00:00:00 2001 From: Nik Bougalis Date: Thu, 31 Mar 2016 09:57:03 -0700 Subject: [PATCH] Only object instances can have members (RIPD-1100) --- src/ripple/json/impl/json_value.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ripple/json/impl/json_value.cpp b/src/ripple/json/impl/json_value.cpp index 227511ee1..27c0aae7c 100644 --- a/src/ripple/json/impl/json_value.cpp +++ b/src/ripple/json/impl/json_value.cpp @@ -1002,6 +1002,9 @@ Value::removeMember ( std::string const& key ) bool Value::isMember ( const char* key ) const { + if (type_ != objectValue) + return false; + const Value* value = & ((*this)[key]); return value != &null; }