From a0c42b482418b04b5179d13aa7a9be0c4ef02782 Mon Sep 17 00:00:00 2001 From: Yuta Doi Date: Fri, 8 Jun 2018 10:28:28 +0900 Subject: Bug fix: convert nullptr to string Change-Id: I418de2403730998a6437476e878cd03f4c40cb0d Signed-off-by: Yuta Doi --- src/app.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/app.cpp b/src/app.cpp index 93d827f..dca0e74 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -524,7 +524,15 @@ void App::allocateWindowResource(char const *event, char const *drawing_name, if (nullptr != new_area) { json_object_object_add(json_in, "area", json_object_new_string(new_area)); } - rm::g_new_role = std::string(new_role); // TODO: workaround + + // TODO: workaround + if (nullptr != new_role) { + rm::g_new_role = std::string(new_role); + } + else { + rm::g_new_role = std::string(""); + } + this->pm_.inputEvent(json_in); // Release json_object -- cgit 1.2.3-korg