diff options
author | truelight <truelight@openttd.org> | 2004-12-13 18:32:49 +0000 |
---|---|---|
committer | truelight <truelight@openttd.org> | 2004-12-13 18:32:49 +0000 |
commit | 56779d86115c6262e22c2108ff50aedbddb51bcd (patch) | |
tree | c1cd1b796c9f1b40b4b173681f45537b629afc8a | |
parent | 82f89899ea183b66581936d1621d4063a71a608e (diff) | |
download | openttd-56779d86115c6262e22c2108ff50aedbddb51bcd.tar.xz |
(svn r1062) -Fix: [Console] Compile warnigs in Get/SetPatchSettings
-rw-r--r-- | settings_gui.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/settings_gui.c b/settings_gui.c index 20a5696a1..6fbc4656b 100644 --- a/settings_gui.c +++ b/settings_gui.c @@ -983,7 +983,7 @@ int32 CmdChangePatchSetting(int x, int y, uint32 flags, uint32 p1, uint32 p2) void ConsoleSetPatchSetting(char *name, char *value) { const PatchPage *page; - const PatchEntry *pe; + const PatchEntry *pe = NULL; bool found = false; int i, j; int val; @@ -1004,7 +1004,7 @@ void ConsoleSetPatchSetting(char *name, char *value) } /* We did not found the patch setting */ - if (!found) { + if (!found || pe == NULL) { IConsolePrintF(_iconsole_color_warning, "'%s' is an unkown patch setting", name); return; } @@ -1041,7 +1041,7 @@ void ConsoleSetPatchSetting(char *name, char *value) void ConsoleGetPatchSetting(char *name) { const PatchPage *page; - const PatchEntry *pe; + const PatchEntry *pe = NULL; char value[50]; bool found = false; int i, j; @@ -1062,7 +1062,7 @@ void ConsoleGetPatchSetting(char *name) } /* We did not found the patch setting */ - if (!found) { + if (!found || pe == NULL) { IConsolePrintF(_iconsole_color_warning, "'%s' is an unkown patch setting", name); return; } |