summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/newgrf_gui.cpp2
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();
}