1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-30 15:18:42 +02:00

A null pointer check

This commit is contained in:
Paul Licameli 2016-06-21 19:02:04 -04:00
parent 58e3f3da83
commit 3410b601e1

View File

@ -261,7 +261,8 @@ bool ExportFFmpeg::Init(const char *shortname, AudacityProject *project, const T
{
// This will undo the acquisition of resources along any early exit path:
auto deleter = [](ExportFFmpeg *This) {
This->FreeResources();
if (This)
This->FreeResources();
};
std::unique_ptr<ExportFFmpeg, decltype(deleter)> cleanup{ this, deleter };