Changeset - r24590:46bcf768eeb2
[Not reviewed]
master
0 1 0
Patric Stout - 4 years ago 2021-01-07 09:32:24
truebrain@openttd.org
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.
1 file changed with 1 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/group_gui.cpp
Show inline comments
 
@@ -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);
 
	}
0 comments (0 inline, 0 general)