diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/search.cpp | 1 | ||||
| -rw-r--r-- | src/unix/main_unix.cpp | 2 | ||||
| -rw-r--r-- | src/windows/main_windows.cpp | 2 |
3 files changed, 5 insertions, 0 deletions
diff --git a/src/search.cpp b/src/search.cpp index dfb96b2..2a7d5d6 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -359,6 +359,7 @@ finish_early: } void ts_destroy_result(ts_search_result* result) { + if (result == NULL) return; ts_memory_bucket_destroy(&result->memory); ts_array_destroy(&result->files); ts_array_destroy(&result->matches); diff --git a/src/unix/main_unix.cpp b/src/unix/main_unix.cpp index dc8985f..906634b 100644 --- a/src/unix/main_unix.cpp +++ b/src/unix/main_unix.cpp @@ -145,6 +145,8 @@ int main(int, char**) glfwSwapBuffers(window); } + ts_destroy_result(current_search_result); + // Cleanup ImGui_ImplOpenGL3_Shutdown(); ImGui_ImplGlfw_Shutdown(); diff --git a/src/windows/main_windows.cpp b/src/windows/main_windows.cpp index 2426159..1479e79 100644 --- a/src/windows/main_windows.cpp +++ b/src/windows/main_windows.cpp @@ -183,6 +183,8 @@ int main(int, char**) _ts_platform_draw_frame(); } + ts_destroy_result(current_search_result); + ImGui_ImplOpenGL3_Shutdown(); ImGui_ImplWin32_Shutdown(); ImGui::DestroyContext(); |
