From: Paul Wisbey
Date: Fri, 31 Jul 2015 15:18:02 +0000 (+0100)
Subject: Fixed memory corruption in RendererAttachment::DoPrepareRender()
X-Git-Tag: dali_1.0.52~3
X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-core.git;a=commitdiff_plain;h=fb65a6eaeeb2a2955fe8c4b6da359245cfcb047b
Fixed memory corruption in RendererAttachment::DoPrepareRender()
(Fixes crash issue in blocks.example)
Change-Id: I18a3f3690ddc0204a1b69c0687aabae4fc627dad
---
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 abbe7e1..eac06ef 100644
--- a/dali/internal/update/node-attachments/scene-graph-renderer-attachment.cpp
+++ b/dali/internal/update/node-attachments/scene-graph-renderer-attachment.cpp
@@ -399,16 +399,17 @@ void RendererAttachment::DoPrepareRender( BufferIndex updateBufferIndex )
if( mResendGeometry )
{
+ // The first call to GetRenderGeometry() creates the geometry and sends it in a message
+ RenderGeometry* geometry = mGeometry->GetRenderGeometry( mSceneController );
+
typedef MessageValue1< NewRenderer, RenderGeometry* > DerivedType;
unsigned int* slot = mSceneController->GetRenderQueue().ReserveMessageSlot( updateBufferIndex, sizeof( DerivedType ) );
- new (slot) DerivedType( mRenderer, &NewRenderer::SetGeometry,mGeometry->GetRenderGeometry(mSceneController) );
+ new (slot) DerivedType( mRenderer, &NewRenderer::SetGeometry, geometry );
mResendGeometry = false;
-
}
}
-
void RendererAttachment::ConnectionsChanged( PropertyOwner& object )
{
// One of our child objects has changed it's connections. Ensure the uniform