fix segfault if urlhandler is not defined in golded.cfg

This commit is contained in:
Stas Degteff 2010-03-26 22:17:07 +00:00
parent e2c0c182de
commit 5cde6a3023
3 changed files with 20 additions and 1 deletions

View File

@ -10,6 +10,12 @@ _____________________________________________________________________________
‡ ¬¥âª¨ ¤«ï GoldED+ 1.1.5, /snapshot/ ‡ ¬¥âª¨ ¤«ï GoldED+ 1.1.5, /snapshot/
_____________________________________________________________________________ _____________________________________________________________________________
! …᫨ ­¥â ­¨ ®¤­®£® URLHANDLER ¨ ¢ë§ë¢ ¥âáï READpeekURLs, Golded+ ⥯¥àì ­¥
¯ ¤ ¥â á segmentation fault.
+ <20>®¢ ï ¤¨à¥ªâ¨¢  ä ©«  goldlang.cfg "IL_PEEKINFONOHANDLER" (á®®¡é¥­¨¥ " URL
handler are not defined in config file! ")
! <20>¥à¥­ §­ ç¥­ë ª« ¢¨è¨: Ctrl-Backspace ⥯¥àì 㤠«ï¥â ᨬ¢®« ¢«¥¢®, Ctrl-W ! <20>¥à¥­ §­ ç¥­ë ª« ¢¨è¨: Ctrl-Backspace ⥯¥àì 㤠«ï¥â ᨬ¢®« ¢«¥¢®, Ctrl-W
㤠«ï¥â á«®¢® ¢«¥¢®. (Ž¡å®¤ ¡ £  á ®¯à¥¤¥«¥­¨¥¬ Ctrl-Backspace ¢ Linux.) 㤠«ï¥â á«®¢® ¢«¥¢®. (Ž¡å®¤ ¡ £  á ®¯à¥¤¥«¥­¨¥¬ Ctrl-Backspace ¢ Linux.)

View File

@ -10,7 +10,13 @@ ______________________________________________________________________
Notes for GoldED+ 1.1.5, /snapshot/ 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 left and Ctrl-W deletes word to left. (Workaround to Ctrl-Backspace
detection bug in Linux.) detection bug in Linux.)

View File

@ -721,6 +721,13 @@ static bool PeekURLCmp(const std::string &a, const std::string b)
void ReadPeekURLs(GMsg* msg) void ReadPeekURLs(GMsg* msg)
{ {
if( CFG->urlhandler.empty() )
{
w_info(LNG->PeekInfoNoHandler);
waitkeyt(10000);
w_info(NULL);
return;
}
w_info(LNG->Wait); w_info(LNG->Wait);
// Scan the current msg for urls // Scan the current msg for urls