diff options
author | Yuta Doi <yuta-d@witz-inc.co.jp> | 2018-06-08 10:28:28 +0900 |
---|---|---|
committer | Yuta Doi <yuta-d@witz-inc.co.jp> | 2018-06-08 10:28:28 +0900 |
commit | a0c42b482418b04b5179d13aa7a9be0c4ef02782 (patch) | |
tree | c6c6eee255c33f7c9a12aa82ecb3973e5479ebd6 /src/app.cpp | |
parent | f248bc82281daaa15d71a7aff6290d17028a19f6 (diff) |
Bug fix: convert nullptr to string
Change-Id: I418de2403730998a6437476e878cd03f4c40cb0d
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
Diffstat (limited to 'src/app.cpp')
-rw-r--r-- | src/app.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
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 |