diff options
author | rubidium <rubidium@openttd.org> | 2008-05-10 08:58:52 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-05-10 08:58:52 +0000 |
commit | f23026cce8fa49974e3dd06e00dd073cb45f906b (patch) | |
tree | 746df1921c03a63762ea8a5c0a05a16d672c34fe /src/player_gui.cpp | |
parent | e099831210a55f71f7def91d2ee9fb6c3058a1eb (diff) | |
download | openttd-f23026cce8fa49974e3dd06e00dd073cb45f906b.tar.xz |
(svn r13027) -Codechange: use StrEmpty instead of arr[0] == '\0' and remove the need for WE_ON_EDIT_TEXT_CANCEL.
Diffstat (limited to 'src/player_gui.cpp')
-rw-r--r-- | src/player_gui.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/player_gui.cpp b/src/player_gui.cpp index 78f5120d2..70414cd7f 100644 --- a/src/player_gui.cpp +++ b/src/player_gui.cpp @@ -979,6 +979,7 @@ static void SelectPlayerFaceWndProc(Window *w, WindowEvent *e) break; case WE_ON_EDIT_TEXT: + if (e->we.edittext.str == NULL) break; /* Set a new player face number */ if (!StrEmpty(e->we.edittext.str)) { *pf = strtoul(e->we.edittext.str, NULL, 10); @@ -1331,7 +1332,7 @@ static void PlayerCompanyWndProc(Window *w, WindowEvent *e) break; case WE_ON_EDIT_TEXT: - if (StrEmpty(e->we.edittext.str)) return; + if (StrEmpty(e->we.edittext.str)) break; _cmd_text = e->we.edittext.str; switch (WP(w, def_d).byte_1) { |