Merge "Fix a memory leak." am: 1715678a89 am: 8f9c005fa9
am: 85785b557a
Change-Id: I1e05b7d2793797cba915d0debd775b6b09b972cb
This commit is contained in:
@@ -1028,7 +1028,11 @@ bool ShaderProgram::SetAttributeValues(ProgramVar var,
|
|||||||
attrib.values = data_cpy;
|
attrib.values = data_cpy;
|
||||||
attrib.owned_data = data_cpy; // Marks this for deletion later on
|
attrib.owned_data = data_cpy; // Marks this for deletion later on
|
||||||
|
|
||||||
return StoreAttribute(attrib);
|
if (StoreAttribute(attrib))
|
||||||
|
return true;
|
||||||
|
// If storing this failed, then it won't be deleted on its own.
|
||||||
|
delete[] data_cpy;
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ShaderProgram::StoreAttribute(VertexAttrib attrib) {
|
bool ShaderProgram::StoreAttribute(VertexAttrib attrib) {
|
||||||
|
|||||||
Reference in New Issue
Block a user