Fix Service Loader Context to be assigned
authorJihoi Kim <jihoi.kim@samsung.com>
Mon, 28 Apr 2025 08:41:53 +0000 (17:41 +0900)
committerJihoi Kim <jihoi.kim@samsung.com>
Mon, 28 Apr 2025 12:34:16 +0000 (21:34 +0900)
- Currently, there are no operation that initialize ::Context
- The context should be assigned ServiceLoaderExt.ctor

Signed-off-by: Jihoi Kim <jihoi.kim@samsung.com>
src/stub_service_loader.cc

index 0539d96f4b7d176aec5c52d25d1c3b837627d4e9..cffe52ffa691bb453239b402113dba85409d6ede 100644 (file)
@@ -41,6 +41,7 @@ class ServiceLoaderExt : public tizen_base::ServiceLoader {
   ServiceLoaderExt(int argc, char** argv, std::string name)
       : tizen_base::ServiceLoader(argc, argv, std::move(name)) {
     if (context != nullptr) throw std::runtime_error("Already exits");
+    context = this;
   }
 
   virtual ~ServiceLoaderExt() { context = nullptr; }