mirror of
https://github.com/Expand-sys/CCash
synced 2025-12-17 00:22:14 +11:00
further safegaurds
This commit is contained in:
parent
cc3aa0882a
commit
596ae46286
1 changed files with 6 additions and 2 deletions
|
|
@ -214,8 +214,10 @@ public:
|
|||
});
|
||||
}
|
||||
}
|
||||
|
||||
writer->write(temp, &user_save);
|
||||
if(!temp.isNull())
|
||||
{
|
||||
writer->write(temp, &user_save);
|
||||
}
|
||||
user_save.close();
|
||||
}
|
||||
|
||||
|
|
@ -230,6 +232,8 @@ public:
|
|||
JSONCPP_STRING errs;
|
||||
if (!parseFromStream(builder, user_save, &temp, &errs))
|
||||
{
|
||||
std::cerr<<errs<<'\n';
|
||||
throw std::invalid_argument("Parsing Failed\n");
|
||||
user_save.close();
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in a new issue