sobotka / olive

NLE video editor
GNU General Public License v3.0
2 stars 1 forks source link

[TODO] Add checks to StringToValue #142

Closed ThomasWilshaw closed 3 years ago

ThomasWilshaw commented 3 years ago

General TODO Summary If config.xml has become corrupted Olive can fail to launch. To reproduce replace line 46 with <NodeCatColor9></NodeCatColor9> and try to run Olive. You should get the following error:

[FATAL] ASSERT failure in QList<T>::at: "index out of range", file C:\Users\Tom\Docum
ents\repos\vcpkg\installed\x64-windows\include\QtCore/qlist.h, line 571 ((null):571)

Additional Information / Notes Fairly low hanging fruit but could possibly be fixed by checking the length of the various QStringList vals in NodeInput::StringToValue and returning null if it's the wrong length. Then check for null in Config::Load() and revert to defaults with a warning.

I don't know if this is overkill or equally if there's other things we should test for (corrupted keys maybe?).

itsmattkc commented 3 years ago

Done in 3ab36eb7fcc2b8ca58193409ce652e5ae58e82b6