From 897e570ae0f4915cd1f8c9d7e218324143e41f22 Mon Sep 17 00:00:00 2001 From: eidheim Date: Tue, 6 Feb 2018 22:32:22 +0100 Subject: [PATCH] Language protocol: fixed potential crash in hover method --- src/source_language_protocol.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/source_language_protocol.cc b/src/source_language_protocol.cc index 3232a82..0ee05d1 100644 --- a/src/source_language_protocol.cc +++ b/src/source_language_protocol.cc @@ -925,10 +925,11 @@ void Source::LanguageProtocolView::show_type_tooltips(const Gdk::Rectangle &rect } if(content.empty()) { auto contents_it=result.find("contents"); - if(contents_it!=result.not_found()) - content=contents_it->second.get_value(""); - if(content.empty()) + if(contents_it!=result.not_found()) { content=contents_it->second.get("value", ""); + if(content.empty()) + content=contents_it->second.get_value(""); + } } if(!content.empty()) { dispatcher.post([this, offset, content=std::move(content)] {