Browse Source
Context: While the network file is disconnected, it's considered non-existent and might to be deleted. The reason of crash: "doClose" on the same buffer happens twice while users clicks X button, then chooses "No" when they are asked whether if this file should be kept in editor. Explanation: When user clicks X button on the tab of the file in question to close it, "activateBuffer" is called, then "fileClose" is called. * activateBuffer: Following "activeateBuffer" call in the depth, "checkFileState" is invoked - that leads the message "The file "xxxxxx" doesn't exist anymore. Keep this file in Editor?". If user clicks on No, "doClose" will close the tab and destroy the buffer. * fileClose: in "fileClose" call, "doClose" will be invoked and try to close the already-destroyed buffer. Solution: Retrieve the buffer ID once again, after "activateBuffer" call, for comparing with old buffer ID. If the buffer was destroyed, the new retrieved buffer ID is not the same. Note: this commit fixes the crash, but it doesn't fix the misbehaviour: If user clicks on "Yes" to answer the message "The file "xxxxxx" doesn't exist anymore. Keep this file in Editor?", the tab will be still closed. Fix #15684, close #15685pull/15679/head
Don Ho
2 months ago
1 changed files with 5 additions and 1 deletions
Loading…
Reference in new issue