mirror of
https://github.com/huderlem/porymap.git
synced 2026-03-21 17:45:44 -05:00
Avoid potential crash if file watching resources are exhausted
Some checks are pending
Build Porymap / build-linux (5.14.2) (push) Waiting to run
Build Porymap / build-linux (6.8.2) (push) Waiting to run
Build Porymap / build-macos (macos-15-intel) (push) Waiting to run
Build Porymap / build-macos (macos-latest) (push) Waiting to run
Build Porymap / build-static-windows (push) Waiting to run
Some checks are pending
Build Porymap / build-linux (5.14.2) (push) Waiting to run
Build Porymap / build-linux (6.8.2) (push) Waiting to run
Build Porymap / build-macos (macos-15-intel) (push) Waiting to run
Build Porymap / build-macos (macos-latest) (push) Waiting to run
Build Porymap / build-static-windows (push) Waiting to run
This commit is contained in:
parent
9bdb25e10d
commit
d59b24bd6f
|
|
@ -766,6 +766,7 @@ bool Project::watchFile(const QString &filename) {
|
|||
if (!this->fileWatcher) {
|
||||
// Only create the file watcher when it's first needed (even an empty QFileSystemWatcher will consume system resources).
|
||||
this->fileWatcher = new QFileSystemWatcher(this);
|
||||
if (!this->fileWatcher) return false;
|
||||
QObject::connect(this->fileWatcher, &QFileSystemWatcher::fileChanged, this, &Project::recordFileChange);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user