aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authormalard <malard@svn>2010-09-01 19:05:26 +0000
committermalard <malard@svn>2010-09-01 19:05:26 +0000
commitc3e5d0bb79ab57d8fa8b1c21c59db1781831ed9d (patch)
treee31a4ffa5e0217ea3f1bf97f018ae580f53af34d /lib
parent61712b287d405ce91ab17b89198e87d5b7b06ada (diff)
Fixed crash with unexpectedly formed JSON query.
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@33401 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
Diffstat (limited to 'lib')
-rw-r--r--lib/jsoncpp/jsoncpp/src/lib_json/json_value.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/jsoncpp/jsoncpp/src/lib_json/json_value.cpp b/lib/jsoncpp/jsoncpp/src/lib_json/json_value.cpp
index 734bf16252..bee3f70f64 100644
--- a/lib/jsoncpp/jsoncpp/src/lib_json/json_value.cpp
+++ b/lib/jsoncpp/jsoncpp/src/lib_json/json_value.cpp
@@ -1047,8 +1047,8 @@ Value::isValidIndex( UInt index ) const
const Value &
Value::operator[]( const char *key ) const
{
- JSON_ASSERT( type_ == nullValue || type_ == objectValue );
- if ( type_ == nullValue )
+ JSON_ASSERT( type_ == nullValue || type_ == objectValue || type_ == arrayValue );
+ if ( type_ == nullValue || type_ == arrayValue)
return null;
#ifndef JSON_VALUE_USE_INTERNAL_MAP
CZString actualKey( key, CZString::noDuplication );