Skip to content

Commit

Permalink
ccrystaltextmakers.cpp: Fix crash when searching or replacing text af…
Browse files Browse the repository at this point in the history
…ter reloading files
  • Loading branch information
sdottaka committed Dec 11, 2017
1 parent 3a0e830 commit b652082
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Externals/crystaledit/editlib/ccrystaltextmarkers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ CString CCrystalTextMarkers::MakeNewId() const

void CCrystalTextMarkers::AddView(CCrystalTextView *pView)
{
m_views.push_back(pView);
auto it = std::find(m_views.begin(), m_views.end(), pView);
if (it == m_views.end())
m_views.push_back(pView);
}

void CCrystalTextMarkers::DeleteView(CCrystalTextView *pView)
Expand Down

0 comments on commit b652082

Please sign in to comment.