PVS-StudioWarnings

PVS-Studio warning V522 for UnrealEngine4

Nov 21st, 2014
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.75 KB | None | 0 0
  1. bool UEngine::CommitMapChange( FWorldContext &Context )
  2. {
  3.   ....
  4.   LevelStreamingObject = Context.World()->StreamingLevels[j];
  5.   if (LevelStreamingObject != NULL)
  6.   {
  7.     ....
  8.   }
  9.   else
  10.   {
  11.     check(LevelStreamingObject);
  12.     UE_LOG(LogStreaming, Log,
  13.            TEXT("Unable to handle streaming object %s"),
  14.            *LevelStreamingObject->GetName());
  15.   }
  16.   ....
  17. }
  18.  
  19. This suspicious code was found in UnrealEngine4 project by PVS-Studio static code analyzer.
  20. Warning message is:
  21. V522 Dereferencing of the null pointer 'LevelStreamingObject' might take place. unrealengine.cpp 10768
  22.  
  23. 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