From 5cde6a3023d56b601683a00e6787358c95097d30 Mon Sep 17 00:00:00 2001 From: Stas Degteff Date: Fri, 26 Mar 2010 22:17:07 +0000 Subject: [PATCH] fix segfault if urlhandler is not defined in golded.cfg --- docs/notework.rus | 6 ++++++ docs/notework.txt | 8 +++++++- golded3/geread2.cpp | 7 +++++++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/docs/notework.rus b/docs/notework.rus index f4de260..5be2b81 100644 --- a/docs/notework.rus +++ b/docs/notework.rus @@ -10,6 +10,12 @@ _____________________________________________________________________________ Заметки для GoldED+ 1.1.5, /snapshot/ _____________________________________________________________________________ +! Если нет ни одного URLHANDLER и вызывается READpeekURLs, Golded+ теперь не + падает с segmentation fault. + ++ Новая директива файла goldlang.cfg "IL_PEEKINFONOHANDLER" (сообщение " URL + handler are not defined in config file! ") + ! Переназначены клавиши: Ctrl-Backspace теперь удаляет символ влево, Ctrl-W удаляет слово влево. (Обход бага с определением Ctrl-Backspace в Linux.) diff --git a/docs/notework.txt b/docs/notework.txt index 6b44953..979a1de 100644 --- a/docs/notework.txt +++ b/docs/notework.txt @@ -10,7 +10,13 @@ ______________________________________________________________________ Notes for GoldED+ 1.1.5, /snapshot/ ______________________________________________________________________ -! Keyboard shortcats is chnged: now Ctrl-Backspace deletes char to +! If not defined any URLHANDLER and key "READpeekURLs" is pressed, + Golded+ does not trap now (segmentation fault fixed). + ++ New token IL_PEEKINFONOHANDLER for goldlang.cfg (message + " URL handler are not defined in config file! " + +! Keyboard shortcats is changed: now Ctrl-Backspace deletes char to left and Ctrl-W deletes word to left. (Workaround to Ctrl-Backspace detection bug in Linux.) diff --git a/golded3/geread2.cpp b/golded3/geread2.cpp index 02ef411..e5a8831 100644 --- a/golded3/geread2.cpp +++ b/golded3/geread2.cpp @@ -721,6 +721,13 @@ static bool PeekURLCmp(const std::string &a, const std::string b) void ReadPeekURLs(GMsg* msg) { + if( CFG->urlhandler.empty() ) + { + w_info(LNG->PeekInfoNoHandler); + waitkeyt(10000); + w_info(NULL); + return; + } w_info(LNG->Wait); // Scan the current msg for urls