From fc5a2102b9e34c364ea1987bff924a8943eef4df Mon Sep 17 00:00:00 2001 From: Alexandr Gavriliuc Date: Wed, 19 Aug 2020 10:35:22 +0300 Subject: [PATCH] Prevent launching client thread on exit --- examples/pxScene2d/src/pxWayland.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/pxScene2d/src/pxWayland.cpp b/examples/pxScene2d/src/pxWayland.cpp index e92bc1de88..20a5c34454 100644 --- a/examples/pxScene2d/src/pxWayland.cpp +++ b/examples/pxScene2d/src/pxWayland.cpp @@ -131,6 +131,7 @@ pxWayland::~pxWayland() WstCompositorSetClientStatusCallback(mWCtx, NULL, NULL); terminateClient(); WstCompositorDestroy(mWCtx); + mWCtx = NULL; //Adding mClientTerminated flag check because SIGKILL has to be sent to //the Process only when it got SIGTERM from terminateClient(). if (mClientTerminated && (mClientPID > 0) && (0 == kill(mClientPID, 0))) @@ -143,11 +144,10 @@ pxWayland::~pxWayland() mClientTerminated = false; } mClientPID= -1; - mWCtx = NULL; } if (gUIThreadQueue) { - gUIThreadQueue->removeAllTasksForObject(this); + gUIThreadQueue->removeAllTasksForObject(this, onRemoveTask); } }