[CoordinatedGraphics] Null dereference in CoordinatedGraphicsLayer::setCoordinatorInc...
authormagomez@igalia.com <magomez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Mar 2019 08:55:01 +0000 (08:55 +0000)
committermagomez@igalia.com <magomez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Mar 2019 08:55:01 +0000 (08:55 +0000)
https://bugs.webkit.org/show_bug.cgi?id=195615

Reviewed by Carlos Garcia Campos.

Exit early if we don't receive a valid coordinator.

* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::setCoordinatorIncludingSubLayersIfNeeded):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@242864 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp

index 2c023f5..3d45c3a 100644 (file)
@@ -1,3 +1,15 @@
+2019-03-13  Miguel Gomez  <magomez@igalia.com>
+
+        [CoordinatedGraphics] Null dereference in CoordinatedGraphicsLayer::setCoordinatorIncludingSubLayersIfNeeded
+        https://bugs.webkit.org/show_bug.cgi?id=195615
+
+        Reviewed by Carlos Garcia Campos.
+
+        Exit early if we don't receive a valid coordinator.
+
+        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
+        (WebCore::CoordinatedGraphicsLayer::setCoordinatorIncludingSubLayersIfNeeded):
+
 2019-03-13  Fujii Hironori  <Hironori.Fujii@sony.com>
 
         [Win][PlayStation] Remove WebCore::standardUserAgentForURL
index c73dcee..bd32666 100644 (file)
@@ -978,7 +978,7 @@ void CoordinatedGraphicsLayer::setCoordinator(CoordinatedGraphicsLayerClient* co
 
 void CoordinatedGraphicsLayer::setCoordinatorIncludingSubLayersIfNeeded(CoordinatedGraphicsLayerClient* coordinator)
 {
-    if (m_coordinator == coordinator)
+    if (!coordinator || m_coordinator == coordinator)
         return;
 
     // If the coordinators are different it means that we are attaching a layer that was created by a different