From d7e769040b508aaf15ce7b51cc1a565d41cdb079 Mon Sep 17 00:00:00 2001 From: David Runge Date: Wed, 27 May 2020 23:09:50 +0200 Subject: [PATCH] Fix crash on track resize As discussed in #538, there is an issue with the track resize option, where with audacity >= 2.4.0, compiled using the autotools setup leads to a hard crash. The sizeof(wxFrame) in src/menus/ViewMenus.cpp and src/ProjectWindow.cpp is not aligned, leading to GetVerticalScrollBar in src/menus/ViewMenus.cpp accessing unallocated memory. By ordering the include of ProjectWindow.h before the include of Project.h, this crash is prevented. --- src/menus/ViewMenus.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/menus/ViewMenus.cpp b/src/menus/ViewMenus.cpp index 8142be887a2..1e301ad4714 100644 --- a/src/menus/ViewMenus.cpp +++ b/src/menus/ViewMenus.cpp @@ -4,10 +4,10 @@ #include "../CommonCommandFlags.h" #include "../Menus.h" #include "../Prefs.h" +#include "../ProjectWindow.h" #include "../Project.h" #include "../ProjectHistory.h" #include "../ProjectSettings.h" -#include "../ProjectWindow.h" #include "../Track.h" #include "../TrackInfo.h" #include "../TrackPanel.h"