From 3e316641b129038831110232b0065a02c0cc0f0c Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 14 May 2019 08:51:37 -0700 Subject: More fixes. --- src/unstable/json.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/unstable/json.cpp b/src/unstable/json.cpp index b1414a9..8c766dd 100644 --- a/src/unstable/json.cpp +++ b/src/unstable/json.cpp @@ -276,6 +276,8 @@ Bu::Json &Bu::Json::append( bool bValue ) Bu::Json &Bu::Json::appendObject() { + if( eType != Array ) + throw Bu::ExceptionBase("Cannot append to non-array Json Types."); Json *pOb = new Json( Object ); uDat.pArray->append( pOb ); return *pOb; -- cgit v1.2.3