Skip to content

Commit 7760fbf

Browse files
committed
Fix: Create a copy of editActions instead of getting a pointer in RenderSession::EndSceneEdit().
1 parent 7d82b22 commit 7760fbf

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

include/slg/editaction.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ typedef enum {
3939
class EditActionList {
4040
public:
4141
EditActionList() { actions = 0; };
42+
EditActionList(EditActionList& editActions) { actions = editActions.GetActions(); };
4243

4344
void Reset() { actions = 0; }
4445
void AddAction(const EditAction a) { actions |= a; };

src/slg/rendersession.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ void RenderSession::BeginSceneEdit() {
9898

9999
void RenderSession::EndSceneEdit() {
100100
// Make a copy of the edit actions
101-
const EditActionList& editActions = renderConfig.GetScene().GetEditActions();
101+
const EditActionList editActions(renderConfig.GetScene().GetEditActions());
102102

103103
if ((renderEngine->GetType() != RTPATHOCL) &&
104104
(renderEngine->GetType() != RTPATHCPU)) {

0 commit comments

Comments
 (0)