core/generation: use deleteLater() to delete file watchers

Should fix crashes similar to those in FileView.
This commit is contained in:
outfoxxed 2025-06-09 22:26:34 -07:00
parent 2b01a75679
commit 2a8479d635
Signed by untrusted user: outfoxxed
GPG key ID: 4C88A185FB89301E

View file

@ -192,7 +192,7 @@ void EngineGeneration::setWatchingFiles(bool watching) {
}
} else {
if (this->watcher != nullptr) {
delete this->watcher;
this->watcher->deleteLater();
this->watcher = nullptr;
}
}