From 8a8c21543a296c7ce68cb4c948532058d219dfa1 Mon Sep 17 00:00:00 2001 From: eidheim Date: Tue, 23 Feb 2021 11:23:19 +0100 Subject: [PATCH] Fixed potential crash when getting value from debug expression --- src/source_clang.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/source_clang.cpp b/src/source_clang.cpp index f1bebad..1332960 100644 --- a/src/source_clang.cpp +++ b/src/source_clang.cpp @@ -627,8 +627,8 @@ void Source::ClangViewParse::show_type_tooltips(const Gdk::Rectangle &rectangle) if(is_safe(cursor)) { // Do not call state altering expressions 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 end = get_buffer()->get_iter_at_line_index(offsets.second.line - 1, offsets.second.index - 1); + auto start = get_iter_at_line_index(offsets.first.line - 1, offsets.first.index - 1); + auto end = get_iter_at_line_index(offsets.second.line - 1, offsets.second.index - 1); std::string expression; // Get full expression from cursor parent: