From 89a1a98bca8797f72c9c4b73c9d6d1496b404c83 Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Mon, 31 Oct 2011 13:13:30 +0000 Subject: [PATCH] Delete the application object from the correct thread. The previous version attempted to Quit() and then immediately delete the app object from another thread. This triggered a debug assert since in the latter case we push a quit message onto the looper's message queue and let that handle terminating the message loop. As a consequence, it was possible for said looper thread to not have finished shutting down properly before we called delete, leading to a debug assert with respect to calling delete on a still running looper. Should correctly fix the crash on terminating the test app_server. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43030 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/servers/app/drawing/ViewHWInterface.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/servers/app/drawing/ViewHWInterface.cpp b/src/servers/app/drawing/ViewHWInterface.cpp index 7d2d76e52c..fe4ca9879c 100644 --- a/src/servers/app/drawing/ViewHWInterface.cpp +++ b/src/servers/app/drawing/ViewHWInterface.cpp @@ -104,6 +104,7 @@ run_app_thread(void* cookie) if (BApplication* app = (BApplication*)cookie) { app->Lock(); app->Run(); + delete app; } return 0; }