Fix crash when processing renames in wxMSW wxFileSystemWatcher
It could (and did, albeit rarely) happen that we read only the first of the couple events associated with a file rename and in this case the code crashed due to dereferencing invalid iterator. Ideal would be to delay sending the "renamed" event until we get the new path, but for now just fix the crash by not using the invalid iterator. Closes #24119.
This commit is contained in:
parent
96b5c1419b
commit
e758d8ad80
1 changed files with 2 additions and 0 deletions
|
|
@ -349,6 +349,8 @@ void wxIOCPThread::ProcessNativeEvents(wxVector<wxEventProcessingData>& events)
|
|||
}
|
||||
wxFileSystemWatcherEvent event(flags, oldpath, newpath);
|
||||
SendEvent(event);
|
||||
if ( it == events.end() )
|
||||
break;
|
||||
}
|
||||
// all other events
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue