title: c++ when entry not found in a map
body: <p>I have a map of pointers. I am looking for an entry and then make a local copy of pointer and delete the entry in the map. My question is in case we could not find an entry, could this code create a problem? </p>
  
  <pre><code>std::map&lt;int, object*&gt;::iterator it2 = m_Frames.find(m_num);
  m_objpointer = it2-&gt;second;
  m_Frames.erase (it2);
  </code></pre>