From 17265362de37d56776d5c2746561d45c30ea2034 Mon Sep 17 00:00:00 2001 From: DarthArgus Date: Sun, 21 Aug 2016 18:23:47 +0000 Subject: [PATCH] getString: check if null before casting --- external/3rd/library/webAPI/webAPI.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external/3rd/library/webAPI/webAPI.cpp b/external/3rd/library/webAPI/webAPI.cpp index 13ad61ae..721a8065 100644 --- a/external/3rd/library/webAPI/webAPI.cpp +++ b/external/3rd/library/webAPI/webAPI.cpp @@ -52,7 +52,7 @@ bool webAPI::setData(std::string &data) std::string webAPI::getString(const std::string &slot) { - if (!this->responseData.empty() && !slot.empty() && responseData.count(slot)) + if (!this->responseData.empty() && !slot.empty() && responseData.count(slot) && !this->responseData[slot].is_null()) { return this->responseData[slot].get(); }