Don't assert when stopping watching a just renamed file.
(Almost) silently ignore renames of the files which we don't watch any longer instead of asserting if this happens. Closes #14863. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73065 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -438,9 +438,13 @@ protected:
|
|||||||
|
|
||||||
// get watch entry for this event
|
// get watch entry for this event
|
||||||
wxFSWatchEntryDescriptors::iterator wit = m_watchMap.find(inevt.wd);
|
wxFSWatchEntryDescriptors::iterator wit = m_watchMap.find(inevt.wd);
|
||||||
wxCHECK_RET(wit != m_watchMap.end(),
|
if (wit == m_watchMap.end())
|
||||||
|
{
|
||||||
|
wxLogTrace(wxTRACE_FSWATCHER,
|
||||||
"Watch descriptor not present in the watch map!");
|
"Watch descriptor not present in the watch map!");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
// Tell the owner, in case it's interested
|
// Tell the owner, in case it's interested
|
||||||
// If there's a filespec, assume he's not
|
// If there's a filespec, assume he's not
|
||||||
wxFSWatchEntry& watch = *(wit->second);
|
wxFSWatchEntry& watch = *(wit->second);
|
||||||
@@ -453,6 +457,7 @@ protected:
|
|||||||
SendEvent(event);
|
SendEvent(event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
m_cookies.erase(it);
|
m_cookies.erase(it);
|
||||||
delete &inevt;
|
delete &inevt;
|
||||||
|
Reference in New Issue
Block a user