Skip to content

Commit

Permalink
Merge pull request #5745 from johnhaddon/staticSignalsLifetime
Browse files Browse the repository at this point in the history
GafferUI : Fix crashes during shutdown
  • Loading branch information
johnhaddon authored Mar 22, 2024
2 parents 6635b5e + f281f4d commit 6711b32
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
---
Expand Down
8 changes: 4 additions & 4 deletions src/GafferUI/PlugAdder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/GafferUI/Pointer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit 6711b32

Please sign in to comment.