Fix crash in i2_eval

refs #10198
This commit is contained in:
Gunnar Beutner 2015-09-23 09:30:30 +02:00
parent c15c9cce5e
commit 38bdbbbd0d
1 changed files with 22 additions and 20 deletions

View File

@ -133,6 +133,7 @@ char *i2_eval(void *uframe, const char *text, Tcl_Interp *interp)
} catch (const ScriptError& ex) { } catch (const ScriptError& ex) {
DebugInfo di = ex.GetDebugInfo(); DebugInfo di = ex.GetDebugInfo();
if (di.FirstLine != 0) {
String text = l_Lines[di.Path]; String text = l_Lines[di.Path];
std::vector<String> lines; std::vector<String> lines;
@ -160,6 +161,7 @@ char *i2_eval(void *uframe, const char *text, Tcl_Interp *interp)
msgbuf << String(pathInfo.GetLength(), ' '); msgbuf << String(pathInfo.GetLength(), ' ');
msgbuf << String(start, ' ') << String(len, '^') << "\n"; msgbuf << String(start, ' ') << String(len, '^') << "\n";
} }
}
msgbuf << ex.what(); msgbuf << ex.what();
} catch (const std::exception& ex) { } catch (const std::exception& ex) {