diff options
Diffstat (limited to 'WebCore')
-rw-r--r-- | WebCore/platform/graphics/android/SharedTexture.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/WebCore/platform/graphics/android/SharedTexture.cpp b/WebCore/platform/graphics/android/SharedTexture.cpp index 495fdd0..040a28a 100644 --- a/WebCore/platform/graphics/android/SharedTexture.cpp +++ b/WebCore/platform/graphics/android/SharedTexture.cpp @@ -156,8 +156,9 @@ void SharedTexture::releaseSource() m_targetTexture.copyAttributes(&m_sourceTexture); } - // create an image from the texture - if (m_eglImage == EGL_NO_IMAGE_KHR) { + // create an image from the texture, only when the texture is valid + if (m_eglImage == EGL_NO_IMAGE_KHR && m_sourceTexture.m_width + && m_sourceTexture.m_height) { GLUtils::createEGLImageFromTexture(m_sourceTexture.m_textureId, &m_eglImage); LOGV("Generating Image (%d) 0x%x", m_sourceTexture.m_textureId, m_eglImage); |