svnno****@sourc*****
svnno****@sourc*****
2011年 8月 5日 (金) 08:16:01 JST
Revision: 4575 http://sourceforge.jp/projects/ttssh2/svn/view?view=rev&revision=4575 Author: maya Date: 2011-08-05 08:16:01 +0900 (Fri, 05 Aug 2011) Log Message: ----------- portforward の編集内容に問題があってダイアログを抜けないときにもフォントを破棄していたのを修正 Modified Paths: -------------- trunk/ttssh2/ttxssh/fwdui.c -------------- next part -------------- Modified: trunk/ttssh2/ttxssh/fwdui.c =================================================================== --- trunk/ttssh2/ttxssh/fwdui.c 2011-08-04 23:14:33 UTC (rev 4574) +++ trunk/ttssh2/ttxssh/fwdui.c 2011-08-04 23:16:01 UTC (rev 4575) @@ -1184,6 +1184,7 @@ PTInstVar pvar; LOGFONT logfont; HFONT font; + BOOL result; switch (msg) { case WM_INITDIALOG: @@ -1225,11 +1226,15 @@ switch (LOWORD(wParam)) { case IDOK: - if (DlgFwdEditFont != NULL) { - DeleteObject(DlgFwdEditFont); + result = end_fwd_edit_dlg(closure->pvar, closure->spec, dlg); + + if (result) { + if (DlgFwdEditFont != NULL) { + DeleteObject(DlgFwdEditFont); + } } - return end_fwd_edit_dlg(closure->pvar, closure->spec, dlg); + return result; case IDCANCEL: EndDialog(dlg, 0);