Commit 8a8c2154 authored by Ole Christian Eidheim's avatar Ole Christian Eidheim
Browse files

Fixed potential crash when getting value from debug expression

parent 46a5e5dc
Pipeline #260365004 passed with stages
in 16 minutes and 39 seconds
...@@ -627,8 +627,8 @@ void Source::ClangViewParse::show_type_tooltips(const Gdk::Rectangle &rectangle) ...@@ -627,8 +627,8 @@ void Source::ClangViewParse::show_type_tooltips(const Gdk::Rectangle &rectangle)
if(is_safe(cursor)) { // Do not call state altering expressions if(is_safe(cursor)) { // Do not call state altering expressions
auto offsets = cursor.get_source_range().get_offsets(); auto offsets = cursor.get_source_range().get_offsets();
auto start = get_buffer()->get_iter_at_line_index(offsets.first.line - 1, offsets.first.index - 1); auto start = get_iter_at_line_index(offsets.first.line - 1, offsets.first.index - 1);
auto end = get_buffer()->get_iter_at_line_index(offsets.second.line - 1, offsets.second.index - 1); auto end = get_iter_at_line_index(offsets.second.line - 1, offsets.second.index - 1);
std::string expression; std::string expression;
// Get full expression from cursor parent: // Get full expression from cursor parent:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment