diff options
author | rubidium <rubidium@openttd.org> | 2013-11-24 14:34:33 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2013-11-24 14:34:33 +0000 |
commit | 45a5aba8d55c68f54885c1de27684e8544e111d9 (patch) | |
tree | 364943b936fea565db97d3120bb829fc41593049 | |
parent | 58c356e935cb299dea7ec6f1259962d12e382b48 (diff) | |
download | openttd-45a5aba8d55c68f54885c1de27684e8544e111d9.tar.xz |
(svn r26084) -Fix: don't allow executing the palette toggling code when it's not editable
-rw-r--r-- | src/newgrf_gui.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp index 61c6b678c..a1c967663 100644 --- a/src/newgrf_gui.cpp +++ b/src/newgrf_gui.cpp @@ -1058,7 +1058,7 @@ struct NewGRFWindow : public Window, NewGRFScanCallback { } case WID_NS_TOGGLE_PALETTE: - if (this->active_sel != NULL || !this->editable) { + if (this->active_sel != NULL && this->editable) { this->active_sel->palette ^= GRFP_USE_MASK; this->SetDirty(); } |