fix(frontends/lean/server): crash when INFO is invoked before VISIT/LOAD

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2014-08-13 18:31:47 -07:00
parent d30854829d
commit 75be034d3d

View file

@ -150,6 +150,7 @@ void server::visit_file(std::string const & fname) {
}
void server::show_info(unsigned linenum) {
check_file();
update();
unsigned i = m_file->find(linenum);
environment const & env = i == 0 ? m_env : m_file->m_snapshots[i-1].m_env;