X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/70d26c3f4ffb24d50457d405c9595fd23f9e5b7c..9eee81a4cf3aa063d4089074073c8a76fb56653b:/demos/poem/wxpoem.cpp?ds=inline diff --git a/demos/poem/wxpoem.cpp b/demos/poem/wxpoem.cpp index 2a2d89c031..3a12a83581 100644 --- a/demos/poem/wxpoem.cpp +++ b/demos/poem/wxpoem.cpp @@ -683,7 +683,9 @@ int MyApp::OnExit() delete NormalFont; delete BoldFont; delete ItalicFont; - delete poem_buffer; + delete[] poem_buffer; + if (search_string) + delete[] search_string; return 0; } @@ -993,7 +995,7 @@ long MainWindow::DoSearch(void) // Load index (or compile it if none found) void TryLoadIndex() { - index_ok = LoadIndex(index_filename); + index_ok = (LoadIndex(index_filename) != 0); if (!index_ok || (nitems == 0)) { PoetryError("Index file not found; will compile new one", "wxPoem");