aboutsummaryrefslogtreecommitdiff
path: root/ext/misc/json1.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/misc/json1.c')
-rw-r--r--ext/misc/json1.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/misc/json1.c b/ext/misc/json1.c
index 5b8a0a05c..6aa4e97f9 100644
--- a/ext/misc/json1.c
+++ b/ext/misc/json1.c
@@ -438,8 +438,9 @@ static void jsonRenderNode(
JsonString *pOut, /* Write JSON here */
sqlite3_value **aReplace /* Replacement values */
){
+ assert( pNode!=0 );
if( pNode->jnFlags & (JNODE_REPLACE|JNODE_PATCH) ){
- if( pNode->jnFlags & JNODE_REPLACE ){
+ if( (pNode->jnFlags & JNODE_REPLACE)!=0 && ALWAYS(aReplace!=0) ){
jsonAppendValue(pOut, aReplace[pNode->u.iReplace]);
return;
}