cogl-buffer: consider it an error to free a mapped buffer
Explicitly warn if we detect that a CoglBuffer is being freed while it is still mapped. Previously we silently unmapped the buffer, but it's not something we want to encourage.
This commit is contained in:
@ -132,8 +132,7 @@ _cogl_buffer_initialize (CoglBuffer *buffer,
|
||||
void
|
||||
_cogl_buffer_fini (CoglBuffer *buffer)
|
||||
{
|
||||
if (COGL_BUFFER_FLAG_IS_SET (buffer, MAPPED))
|
||||
cogl_buffer_unmap (buffer);
|
||||
g_return_if_fail (!COGL_BUFFER_FLAG_IS_SET (buffer, MAPPED));
|
||||
}
|
||||
|
||||
GLenum
|
||||
|
Reference in New Issue
Block a user