From 2b2bfe76cfd9c047972f511b3e6bc637d356ee36 Mon Sep 17 00:00:00 2001 From: eidheim Date: Sun, 24 Jan 2016 11:16:41 +0100 Subject: [PATCH] Fixed crash on debug show variables when variable name was empty --- src/debug.cc | 4 +++- src/directories.cc | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/debug.cc b/src/debug.cc index 2e72c52..ffdbb60 100644 --- a/src/debug.cc +++ b/src/debug.cc @@ -337,7 +337,9 @@ std::vector Debug::get_variables() { variable.thread_index_id=thread.GetIndexID(); variable.frame_index=c_f; - variable.name=value.GetName(); + auto value_name=value.GetName(); + if(value_name!=NULL) + variable.name=value_name; variable.line_nr=declaration.GetLine(); variable.line_index=declaration.GetColumn(); diff --git a/src/directories.cc b/src/directories.cc index aac8cd6..7301030 100644 --- a/src/directories.cc +++ b/src/directories.cc @@ -134,7 +134,7 @@ void Directories::open(const boost::filesystem::path& dir_path) { auto project=cmake->get_functions_parameters("project"); if(project.size()>0 && project[0].second.size()>0) { auto title=project[0].second[0]; - //TOTO: report that set_title does not handle '_' correctly? + //TODO: report that set_title does not handle '_' correctly? size_t pos=0; while((pos=title.find('_', pos))!=std::string::npos) { title.replace(pos, 1, "__");