Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void CGame::Packet_PlayerJoinData ( .... )
- {
- ....
- // Add the player
- CPlayer* pPlayer = m_pPlayerManager->Create (....);
- if ( pPlayer )
- {
- ....
- }
- else
- {
- // Tell the console
- CLogger::LogPrintf(
- "CONNECT: %s failed to connect "
- "(Player Element Could not be created.)\n",
- pPlayer->GetSourceIP() );
- }
- ....
- }
- This suspicious code was found in MTASA project by PVS-Studio static code analyzer.
- Warning message is:
- V522 Dereferencing of the null pointer 'pPlayer' might take place. cgame.cpp 1895
- 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