Fix invalid use after free in compileTopLevelDocument.
This commit is contained in:
parent
365e399036
commit
41aef27643
1 changed files with 2 additions and 1 deletions
|
|
@ -1697,8 +1697,9 @@ void MainWindow::compileTopLevelDocument()
|
|||
delete this->root_module;
|
||||
this->root_module = NULL;
|
||||
|
||||
auto fnameba = this->fileName.toLocal8Bit();
|
||||
const char* fname =
|
||||
this->fileName.isEmpty() ? "" : this->fileName.toLocal8Bit();
|
||||
this->fileName.isEmpty() ? "" : fnameba;
|
||||
this->root_module = parse(fulltext.c_str(), fs::path(fname), false);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue