Fixed timer handle crash on exit with LIBUV profile 48/301048/1
authorDavid Steele <david.steele@samsung.com>
Tue, 7 Nov 2023 15:04:47 +0000 (15:04 +0000)
committerDavid Steele <david.steele@samsung.com>
Tue, 7 Nov 2023 15:04:47 +0000 (15:04 +0000)
Change-Id: I024732cdcfdc1db4f16f647e08198b905df79138

dali/internal/system/libuv/timer-impl-libuv.cpp

index 00b3a62..4d9c80e 100644 (file)
@@ -67,9 +67,11 @@ struct TimerLibuv::Impl
   {
     // the handle will still be alive for a short period after calling uv_close
     // set the data to NULL to avoid a dangling pointer
-    mTimerHandle->data = NULL;
-
-    uv_close(reinterpret_cast<uv_handle_t*>(mTimerHandle), FreeHandleCallback);
+    if(mTimerHandle)
+    {
+      mTimerHandle->data = NULL;
+      uv_close(reinterpret_cast<uv_handle_t*>(mTimerHandle), FreeHandleCallback);
+    }
   }
 
   bool Running()