Fix buffer used in the wrong scope. 36/38936/1
authorFrancisco Santos <f1.santos@samsung.com>
Thu, 30 Apr 2015 15:30:41 +0000 (16:30 +0100)
committerFrancisco Santos <f1.santos@samsung.com>
Thu, 30 Apr 2015 15:30:41 +0000 (16:30 +0100)
Change-Id: Ie9f99e798423a810fe1dc9fa7f64ec791648f770

dali/internal/render/renderers/render-renderer-property-buffer.cpp

index 714df70..9205a6d 100644 (file)
@@ -63,11 +63,11 @@ void RenderPropertyBuffer::Upload( Context& context, BufferIndex bufferIndex )
     std::size_t dataSize = mDataProvider.GetDataSize( bufferIndex );
 
     const void *data = &(mDataProvider.GetData( bufferIndex )[0]);
+    Vector<unsigned short> ushortData;
 
     // Index buffer needs to be unsigned short which is not supported by the property system
     if( mGpuBufferTarget == GpuBuffer::ELEMENT_ARRAY_BUFFER )
     {
-      Vector<unsigned short> ushortData;
       ushortData.Resize( dataSize );
       const unsigned int* unsignedData = static_cast<const unsigned int*>(data);
       for( unsigned int i = 0; i < dataSize; ++i )