diff --git a/cogl/cogl-buffer.c b/cogl/cogl-buffer.c index 0600e01b9..48d0a7dcc 100644 --- a/cogl/cogl-buffer.c +++ b/cogl/cogl-buffer.c @@ -304,7 +304,8 @@ _cogl_buffer_map_range_for_fill_or_fallback (CoglBuffer *buffer, if (ret) return ret; - cogl_error_free (ignore_error); + if (ignore_error) + cogl_error_free (ignore_error); /* If the map fails then we'll use a temporary buffer to fill the data and then upload it using cogl_buffer_set_data when