PVS-StudioWarnings

PVS-Studio warning V595 for Angle

Nov 19th, 2014
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.67 KB | None | 0 0
  1. bool __stdcall glBindTexImage(egl::Surface *surface)
  2. {
  3.   ....
  4.   gl::Texture2D *textureObject = context->getTexture2D();
  5.  
  6.   if (textureObject->isImmutable())
  7.   {
  8.     return false;
  9.   }
  10.  
  11.   if (textureObject)
  12.   {
  13.     textureObject->bindTexImage(surface);
  14.   }
  15.   ....
  16. }
  17.  
  18. This suspicious code was found in Angle project by PVS-Studio static code analyzer.
  19. Warning message is:
  20. V595 The 'textureObject' pointer was utilized before it was verified against nullptr. Check lines: 7088, 7093. libglesv2.cpp 7088
  21.  
  22. PVS-Studio is a static analyzer for detecting bugs in the source code of applications written in C, C++, C++11, C++/CX. Site: http://www.viva64.com/en/pvs-studio/
Advertisement
Add Comment
Please, Sign In to add comment