mirror of
https://github.com/huderlem/porymap.git
synced 2026-08-08 02:54:03 -05:00
Extra pointer safety
This commit is contained in:
parent
c56bac4f95
commit
13c6c90e02
|
|
@ -140,7 +140,12 @@ void Map::setSharedScriptsMap(const QString &sharedScriptsMap) {
|
|||
|
||||
void Map::invalidateScripts() {
|
||||
m_scriptsLoaded = false;
|
||||
|
||||
// m_scriptFileWatcher is a QPointer so clearing it shouldn't be necessary,
|
||||
// but it's possible that Map::getScriptLabels will be called before events are processed.
|
||||
delete m_scriptFileWatcher;
|
||||
m_scriptFileWatcher = nullptr;
|
||||
|
||||
emit scriptsModified();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user