mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-22 14:10:54 -04:00
Prevent crash calling uninitialized service via JSON API
This commit is contained in:
parent
cc6f0b1f05
commit
7a37c11e47
4 changed files with 40 additions and 3 deletions
|
@ -36,7 +36,11 @@ registerHandler("$%apiPath%$",
|
|||
// if caller specified caller_data put it back in the answhere
|
||||
const char kcd[] = "caller_data";
|
||||
if(jReq.HasMember(kcd))
|
||||
jAns.AddMember(kcd, jReq[kcd], jAns.GetAllocator());
|
||||
jAns.AddMember(kcd, jReq[kcd], jAns.GetAllocator());
|
||||
|
||||
if( !checkRsServicePtrReady(
|
||||
$%instanceName%$, "$%instanceName%$", cAns, session ) )
|
||||
return;
|
||||
|
||||
$%paramsDeclaration%$
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue