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 4b178a2..5d575f7 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