PVS-StudioWarnings

PVS-Studio warning V595 for WinMerge

Nov 18th, 2014
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.72 KB | None | 0 0
  1. BOOL CEditDropTargetImpl::
  2. OnDrop (CWnd * pWnd, COleDataObject * pDataObject,
  3.         DROPEFFECT dropEffect, CPoint point)
  4. {
  5.   bool bDataSupported = false;
  6.  
  7.   m_pOwner->HideDropIndicator ();
  8.  
  9.   if ((!m_pOwner) ||
  10.       (!(m_pOwner->QueryEditable ())) ||
  11.       (m_pOwner->GetDisableDragAndDrop ()))
  12.   ...
  13. }
  14.  
  15. This suspicious code was found in WinMerge project by PVS-Studio static code analyzer.
  16. Warning message is:
  17. V595 The 'm_pOwner' pointer was utilized before it was verified against nullptr. Check lines: 1033, 1035. Merge ccrystaleditview.cpp 1033
  18.  
  19. 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