summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCedric Delamarre <cdl@esi-group.com>2020-03-05 10:55:44 +0100
committerCedric Delamarre <cdl@esi-group.com>2020-03-05 10:55:44 +0100
commit54d399b6bbf065082b29db8fdbe573c85b636249 (patch)
tree1738b3de0a5618d17b17def451c0de335f7ce093
parent5812c3a2b09ab383e521f5a0a31db586da55add8 (diff)
downloadscilab-54d399b6bbf065082b29db8fdbe573c85b636249.zip
scilab-54d399b6bbf065082b29db8fdbe573c85b636249.tar.gz
[debugger]crash fixed when an execution finished after a Step Out
Change-Id: Idebf7143806584f7e8faaa5fdf7e6918ca5d24ce
-rw-r--r--scilab/modules/ast/src/cpp/ast/debuggervisitor.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/scilab/modules/ast/src/cpp/ast/debuggervisitor.cpp b/scilab/modules/ast/src/cpp/ast/debuggervisitor.cpp
index 54a98bd..1f0ce45 100644
--- a/scilab/modules/ast/src/cpp/ast/debuggervisitor.cpp
+++ b/scilab/modules/ast/src/cpp/ast/debuggervisitor.cpp
@@ -457,6 +457,13 @@ void DebuggerVisitor::visit(const SeqExp &e)
457bool getMacroSourceFile(std::string* filename) 457bool getMacroSourceFile(std::string* filename)
458{ 458{
459 const std::vector<ConfigVariable::WhereEntry>& lWhereAmI = ConfigVariable::getWhere(); 459 const std::vector<ConfigVariable::WhereEntry>& lWhereAmI = ConfigVariable::getWhere();
460 // "Where" can be empty at the end of script execution
461 // this function is called when the script ends after a step out
462 if(lWhereAmI.empty())
463 {
464 return false;
465 }
466
460 std::string file = scilab::UTF8::toUTF8(*lWhereAmI.back().m_file_name); 467 std::string file = scilab::UTF8::toUTF8(*lWhereAmI.back().m_file_name);
461 if (file.rfind(".bin") != std::string::npos) 468 if (file.rfind(".bin") != std::string::npos)
462 { 469 {