From 3a75f5c32aa9a34d2ee6a6e467ee27e0143447db Mon Sep 17 00:00:00 2001 From: David Fumanal Date: Wed, 1 Jul 2015 10:53:09 +0100 Subject: [PATCH] Fix in RenderAttachment destructor Change-Id: I2bb8be038314b07cd410a3ab28739b35cb843926 --- .../node-attachments/scene-graph-renderer-attachment.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/dali/internal/update/node-attachments/scene-graph-renderer-attachment.cpp b/dali/internal/update/node-attachments/scene-graph-renderer-attachment.cpp index 80f3c5b..e022fd4 100644 --- a/dali/internal/update/node-attachments/scene-graph-renderer-attachment.cpp +++ b/dali/internal/update/node-attachments/scene-graph-renderer-attachment.cpp @@ -81,11 +81,16 @@ RendererAttachment::RendererAttachment() RendererAttachment::~RendererAttachment() { - mMaterial->RemoveConnectionObserver(*this); - mGeometry->RemoveConnectionObserver(*this); - - mMaterial=NULL; - mGeometry=NULL; + if (mMaterial) + { + mMaterial->RemoveConnectionObserver(*this); + mMaterial=NULL; + } + if (mGeometry) + { + mGeometry->RemoveConnectionObserver(*this); + mGeometry=NULL; + } } void RendererAttachment::Initialize2( BufferIndex updateBufferIndex ) -- 2.7.4