diff --git a/Changes.md b/Changes.md index 7d861fabc5e..6f2cc73bd5f 100644 --- a/Changes.md +++ b/Changes.md @@ -26,6 +26,7 @@ Fixes - ImageReader : - Fixed loading of OpenEXR images with 32 bit float data and DWA compression [^1]. - Fixed loading of secondary layers in OpenEXR images with DWA compression [^1]. +- GUI : Fixed potential crashes during shutdown [^1]. API --- diff --git a/src/GafferUI/PlugAdder.cpp b/src/GafferUI/PlugAdder.cpp index ea8d045bfe8..61e27df2c58 100644 --- a/src/GafferUI/PlugAdder.cpp +++ b/src/GafferUI/PlugAdder.cpp @@ -203,14 +203,14 @@ void PlugAdder::updateDragEndPoint( const Imath::V3f position, const Imath::V3f PlugAdder::PlugMenuSignal &PlugAdder::plugMenuSignal() { - static PlugMenuSignal s; - return s; + static PlugMenuSignal *s = new PlugMenuSignal; + return *s; } PlugAdder::MenuSignal &PlugAdder::menuSignal() { - static MenuSignal s; - return s; + static MenuSignal *s = new MenuSignal; + return *s; } void PlugAdder::renderLayer( Layer layer, const Style *style, RenderReason reason ) const diff --git a/src/GafferUI/Pointer.cpp b/src/GafferUI/Pointer.cpp index 2985114104f..1a1e733dd9b 100644 --- a/src/GafferUI/Pointer.cpp +++ b/src/GafferUI/Pointer.cpp @@ -146,6 +146,6 @@ void Pointer::registerPointer( const std::string &name, ConstPointerPtr pointer Pointer::ChangedSignal &Pointer::changedSignal() { - static ChangedSignal s; - return s; + static ChangedSignal *s = new ChangedSignal; + return *s; }