Skip to content

Commit

Permalink
Fix for crash involving not checking for a null return
Browse files Browse the repository at this point in the history
  • Loading branch information
malcom2073 committed Feb 13, 2014
1 parent 3fb7c24 commit 14dbb3d
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions plugins/freeems/freeemscomms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -603,16 +603,19 @@ int FreeEmsComms::retrieveBlockFromFlash(unsigned short location, unsigned short
//emsData.getLocalRamBlockInfo(location)->size;
//emsData.getLocalRamBlockInfo(location)->ramAddress;

for (int i=emsData.getLocalRamBlockInfo(location)->ramAddress + offset;i<emsData.getLocalRamBlockInfo(location)->ramAddress+offset+size;i++)
if (emsData.getLocalRamBlockInfo(location))
{
if (m_dirtyRamAddresses.contains(i))
for (int i=emsData.getLocalRamBlockInfo(location)->ramAddress + offset;i<emsData.getLocalRamBlockInfo(location)->ramAddress+offset+size;i++)
{
m_dirtyRamAddresses.removeOne(i);
if (m_dirtyRamAddresses.contains(i))
{
m_dirtyRamAddresses.removeOne(i);
}
}
if (m_dirtyRamAddresses.size() == 0)
{
emit memoryClean();
}
}
if (m_dirtyRamAddresses.size() == 0)
{
emit memoryClean();
}
return m_sequenceNumber-1;
}
Expand Down

0 comments on commit 14dbb3d

Please sign in to comment.