Fixed crash on exit 61/254361/1 graphics-backend-pre-release-2
authorAdam Bialogonski <adam.b@samsung.com>
Mon, 1 Mar 2021 12:06:55 +0000 (12:06 +0000)
committerAdam Bialogonski <adam.b@samsung.com>
Mon, 1 Mar 2021 12:06:55 +0000 (12:06 +0000)
Making sure that pipeline cache first destroys pipelines and then programs.

Change-Id: I2a7ab0cef8dc2866c04fbaf15852258bb415ebf0

dali/internal/graphics/gles-impl/gles-graphics-pipeline-cache.cpp

index 4b178a2953937f8a29f4c0546a3694a2c57d6626..5d575f79f4b58746c49cca220bd464faf51c9660 100644 (file)
@@ -238,7 +238,14 @@ struct PipelineCache::Impl
   /**
    * @brief destructor
    */
-  ~Impl() = default;
+  ~Impl()
+  {
+    // First destroy pipelines
+    entries.clear();
+
+    // Now programs
+    programEntries.clear();
+  }
 
   /**
    * @brief Structure describes a single cache entry