X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fwx_ptr.h;h=fcca8b18bafb602744c9befb8ab5971bace1a7a7;hb=e8748f158249d7be906f6c6cf2411df45dd07a24;hp=24bccb0438a517b59a9c9a8b4d70c9149a87380c;hpb=963c7649da903b87637975e8c2d634da887d3109;p=dcpomatic.git diff --git a/src/wx/wx_ptr.h b/src/wx/wx_ptr.h index 24bccb043..fcca8b18b 100644 --- a/src/wx/wx_ptr.h +++ b/src/wx/wx_ptr.h @@ -95,6 +95,7 @@ public: { if (_wx) { _wx->Destroy(); + _wx = nullptr; } _wx = new T(std::forward(args)...); }