瀏覽代碼

Initialise hook command widget correctly.

We weren't explicitly zeroing the GUI widget for entering the hook command.
Iain Patterson 9 年之前
父節點
當前提交
10c2787dcb
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      gui.cpp

+ 1 - 1
gui.cpp

@@ -354,7 +354,7 @@ static inline void set_hook_tab(int event_index, int action_index, bool changed)
     SetEnvironmentVariable(hook_name, cmd);
   }
   else {
-    GetEnvironmentVariable(hook_name, cmd, _countof(cmd));
+    if (! GetEnvironmentVariable(hook_name, cmd, _countof(cmd))) cmd[0] = _T('\0');
     SetDlgItemText(tablist[NSSM_TAB_HOOKS], IDC_HOOK, cmd);
   }
 }