Add back the null check in TextureCacheCV::textureFromImage()
authorwilander@apple.com <wilander@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Mar 2017 17:48:51 +0000 (17:48 +0000)
committerwilander@apple.com <wilander@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Mar 2017 17:48:51 +0000 (17:48 +0000)
https://bugs.webkit.org/show_bug.cgi?id=169931
<rdar://problem/27139820>

Reviewed by Alex Christensen.

No new tests. Just adding back a check that was previously there.

* platform/graphics/cv/TextureCacheCV.mm:
(WebCore::TextureCacheCV::textureFromImage):

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

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/cv/TextureCacheCV.mm

index 9c6ae55..123b031 100644 (file)
@@ -1,3 +1,16 @@
+2017-03-22  John Wilander  <wilander@apple.com>
+
+        Add back the null check in TextureCacheCV::textureFromImage()
+        https://bugs.webkit.org/show_bug.cgi?id=169931
+        <rdar://problem/27139820>
+
+        Reviewed by Alex Christensen.
+
+        No new tests. Just adding back a check that was previously there.
+
+        * platform/graphics/cv/TextureCacheCV.mm:
+        (WebCore::TextureCacheCV::textureFromImage):
+
 2017-03-21  Antti Koivisto  <antti@apple.com>
 
         Use AtomicString in RuleSet and RuleFeature
index 76cc03f..fe7919c 100644 (file)
@@ -75,6 +75,9 @@ RetainPtr<TextureCacheCV::TextureType> TextureCacheCV::textureFromImage(CVImageB
 
     auto weakThis = m_weakPtrFactory.createWeakPtr();
     dispatch_async(dispatch_get_main_queue(), [weakThis] {
+        if (!weakThis)
+            return;
+        
         if (auto cache = weakThis->m_cache.get())
 #if PLATFORM(IOS)
             CVOpenGLESTextureCacheFlush(cache, 0);