From 8f48c1f01da2eaa60d69c557f1d7a900e116c72a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ed=C3=AAnis=20Freindorfer=20Azevedo?= Date: Sat, 29 Feb 2020 21:04:57 -0300 Subject: [PATCH] Fix weird `wxWidgets>=3.0` error message. ASSERT INFO: /usr/include/wx-3.0/wx/object.h(160): assert "wxDynamicCast(ptr, T)" failed in wxCheckCast(): wxStaticCast() used incorrectly --- src/wx/sys.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wx/sys.cpp b/src/wx/sys.cpp index a30f79bc..7ee63392 100644 --- a/src/wx/sys.cpp +++ b/src/wx/sys.cpp @@ -705,7 +705,7 @@ PrintDialog::PrintDialog(const uint16_t* data, int lines, bool cont): npw(1), nph(1) { - dlg = wxStaticCast(wxGetApp().frame->FindWindow(XRCID("GBPrinter")), wxDialog); + dlg = wxStaticCast(wxGetApp().frame->FindWindowByName("GBPrinter"), wxDialog); p = XRCCTRL(*dlg, "Preview", wxPanel); wxScrolledWindow* pp = wxStaticCast(p->GetParent(), wxScrolledWindow); wxSize sz(320, lines * 2);