diff options
author | Patric Stout <truebrain@openttd.org> | 2021-01-07 10:32:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-07 10:32:24 +0100 |
commit | c988b4d62ba08ee6a5efa44e0fa10da59dff4ae8 (patch) | |
tree | 2cdfc336909c56aece532ac18e087b06c60f1098 | |
parent | a3a792837220390735b44536762b0127f05b7a63 (diff) | |
download | openttd-c988b4d62ba08ee6a5efa44e0fa10da59dff4ae8.tar.xz |
Fix #8332: aborting group drag&drop could cause crashes with vehicle drag&drop (#8511)
The selected group was not reset when drag&drop was aborted. When
after that vehicle drag&drop was successful, group drag&drop code
was still executed, causing weird behaviour or even crashes.
-rw-r--r-- | src/group_gui.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/group_gui.cpp b/src/group_gui.cpp index 121008795..8ef6a2a1b 100644 --- a/src/group_gui.cpp +++ b/src/group_gui.cpp @@ -981,6 +981,7 @@ public: /* abort drag & drop */ this->vehicle_sel = INVALID_VEHICLE; this->DirtyHighlightedGroupWidget(); + this->group_sel = INVALID_GROUP; this->group_over = INVALID_GROUP; this->SetWidgetDirty(WID_GL_LIST_VEHICLE); } |