[vlc-commits] skins2: Remove dead code

Hugo Beauzée-Luyssen git at videolan.org
Wed Nov 22 16:01:10 CET 2017


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Wed Nov 22 15:14:09 2017 +0100| [842869d498dd540d95d236e2521be1d3a23eb2fa] | committer: Hugo Beauzée-Luyssen

skins2: Remove dead code

And assuming it should have checked for getData directly, no
GenericBitmap::getData implementation can return a null pointer.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=842869d498dd540d95d236e2521be1d3a23eb2fa
---

 modules/gui/skins2/src/generic_bitmap.cpp | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/modules/gui/skins2/src/generic_bitmap.cpp b/modules/gui/skins2/src/generic_bitmap.cpp
index 66abaf1e6f..30c7ea92ab 100644
--- a/modules/gui/skins2/src/generic_bitmap.cpp
+++ b/modules/gui/skins2/src/generic_bitmap.cpp
@@ -74,10 +74,6 @@ bool BitmapImpl::drawBitmap( const GenericBitmap &rSource, int xSrc, int ySrc,
 {
     int srcWidth = rSource.getWidth();
     uint32_t *pSrc = (uint32_t*)rSource.getData() + ySrc * srcWidth + xSrc;
-    if( !pSrc )
-    {
-        return false;
-    }
     if( xSrc < 0 || xSrc + width > srcWidth ||
         ySrc < 0 || ySrc + height > rSource.getHeight() )
     {



More information about the vlc-commits mailing list