From 45a5aba8d55c68f54885c1de27684e8544e111d9 Mon Sep 17 00:00:00 2001 From: rubidium Date: Sun, 24 Nov 2013 14:34:33 +0000 Subject: [PATCH] (svn r26084) -Fix: don't allow executing the palette toggling code when it's not editable --- src/newgrf_gui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp index 61c6b678ca..a1c9676637 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(); }