From b0e931bdd4e34787b5014be7ba3a35f1c6215641 Mon Sep 17 00:00:00 2001 From: James Crook Date: Mon, 14 Sep 2020 19:43:58 +0100 Subject: [PATCH] Fix compile error on Linux (pointer to on-stack temporary). --- src/widgets/ErrorDialog.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/widgets/ErrorDialog.cpp b/src/widgets/ErrorDialog.cpp index c3e0f1ad2..c38f9725f 100644 --- a/src/widgets/ErrorDialog.cpp +++ b/src/widgets/ErrorDialog.cpp @@ -64,7 +64,11 @@ ErrorDialog::ErrorDialog( S.StartHorizontalLay(); { // wxART_ERROR and wxART_INFORMATION are other possibilities. - S.AddIcon( &wxArtProvider::GetBitmap( wxART_WARNING)); +// S.AddIcon( &wxArtProvider::GetBitmap( wxART_WARNING)); + S.SetBorder( 20 ); + wxBitmap bitmap = wxArtProvider::GetBitmap(wxART_WARNING); + auto icon = safenew wxStaticBitmap(S.GetParent(), -1, bitmap); + S.AddWindow( icon ); S.StartVerticalLay(); { S.SetBorder(20);