Fix crash in Radiant Model Preview Dialog, fix #496

the problem was a double-free on files, because USE_COLLADA is not defined.
I'm not even sure why this USE_COLLADA code exists, as we don't have any
real collada support code anywhere..
This commit is contained in:
Daniel Gibson 2022-10-22 20:46:14 +02:00
parent cc0f49f9a8
commit 177740ca88

View file

@ -123,9 +123,9 @@ void CPreviewDlg::BuildTree() {
fileSystem->FreeFileList( files );
#if USE_COLLADA
files = fileSystem->ListFilesTree("models", ".dae");
#endif
AddStrList("base", files->GetList(), MODELS);
fileSystem->FreeFileList(files);
#endif
} else if ( currentMode == SOUNDS ) {
AddSounds( true );
} else if ( currentMode == MATERIALS ) {