From bdcdec1a29cf9e13fb8671d1e66366a736ec2f6c Mon Sep 17 00:00:00 2001 From: paibox Date: Thu, 20 Jun 2013 08:22:50 +0200 Subject: [PATCH] Let's not spam the logs with NULL texture warning messages --- DShowPlugin/DeviceSource.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DShowPlugin/DeviceSource.cpp b/DShowPlugin/DeviceSource.cpp index 62b7e1a1..118de4d0 100644 --- a/DShowPlugin/DeviceSource.cpp +++ b/DShowPlugin/DeviceSource.cpp @@ -1281,7 +1281,7 @@ void DeviceSource::Render(const Vect2 &pos, const Vect2 &size) if(bFlip) { switch(deinterlacingType) { case deinterlacing_Discard: - DrawSpriteEx(texture, (opacity255<<24) | 0xFFFFFF, x, pos.y, x2, pos.y+size.y, 0.0f, 0.0f, 1.0f, 0.5f); + if(texture != NULL) DrawSpriteEx(texture, (opacity255<<24) | 0xFFFFFF, x, pos.y, x2, pos.y+size.y, 0.0f, 0.0f, 1.0f, 0.5f); break; default: DrawSprite(texture, (opacity255<<24) | 0xFFFFFF, x, pos.y, x2, pos.y+size.y); @@ -1291,7 +1291,7 @@ void DeviceSource::Render(const Vect2 &pos, const Vect2 &size) else { switch(deinterlacingType) { case deinterlacing_Discard: - DrawSpriteEx(texture, (opacity255<<24) | 0xFFFFFF, x, pos.y+size.y, x2, pos.y, 0.0f, 0.0f, 1.0f, 0.5f); + if(texture != NULL) DrawSpriteEx(texture, (opacity255<<24) | 0xFFFFFF, x, pos.y+size.y, x2, pos.y, 0.0f, 0.0f, 1.0f, 0.5f); break; default: DrawSprite(texture, (opacity255<<24) | 0xFFFFFF, x, pos.y+size.y, x2, pos.y);