X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a98f98ac6f4422f259fc3324975156f7554adf41..c822ad5a5e30a21ca3340af644bf79804cf7c777:/demos/poem/wxpoem.cpp?ds=sidebyside diff --git a/demos/poem/wxpoem.cpp b/demos/poem/wxpoem.cpp index 3a12a83581..3866bdef48 100644 --- a/demos/poem/wxpoem.cpp +++ b/demos/poem/wxpoem.cpp @@ -33,7 +33,7 @@ #include "wxpoem.h" -#if defined(__WXGTK__) || defined(__WXMOTIF__) +#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__) #include "corner1.xpm" #include "corner2.xpm" #include "corner3.xpm" @@ -236,7 +236,7 @@ void MainWindow::ScanBuffer(wxDC *dc, bool DrawIt, int *max_x, int *max_y) while (ch != 0 && !page_break) { j = 0; -#ifdef __WXMSW__ +#if defined(__WXMSW__) || defined(__WXMAC__) while (((ch = poem_buffer[i]) != 13) && (ch != 0)) #else while (((ch = poem_buffer[i]) != 10) && (ch != 0)) @@ -247,7 +247,7 @@ void MainWindow::ScanBuffer(wxDC *dc, bool DrawIt, int *max_x, int *max_y) i ++; } -#ifdef __WXMSW__ +#if defined(__WXMSW__) || defined(__WXMAC__) if (ch == 13) #else if (ch == 10) @@ -650,7 +650,7 @@ bool MyApp::OnInit() Corner3 = new wxIcon("icon_3"); Corner4 = new wxIcon("icon_4"); #endif -#if defined(__WXGTK__) || defined(__WXMOTIF__) +#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__) Corner1 = new wxIcon( corner1_xpm ); Corner2 = new wxIcon( corner2_xpm ); Corner3 = new wxIcon( corner3_xpm ); @@ -680,9 +680,13 @@ int MyApp::OnExit() delete Corner3; delete Corner4; + // Causes crash since they're deleted by the global font list +#if 0 delete NormalFont; delete BoldFont; delete ItalicFont; +#endif + delete[] poem_buffer; if (search_string) delete[] search_string;