* \file
* A buffer manager that wraps buffers in fenced buffers.
*
- * \author José Fonseca <jrfonseca@tungstengraphics.dot.com>
+ * \author José Fonseca <jrfonseca@tungstengraphics.dot.com>
*/
fenced_buffer_list_destroy(fenced_mgr->fenced_list);
- fenced_mgr->provider->destroy(fenced_mgr->provider);
+ if(fenced_mgr->provider)
+ fenced_mgr->provider->destroy(fenced_mgr->provider);
FREE(fenced_mgr);
}
{
struct fenced_pb_manager *fenced_mgr;
+ if(!provider)
+ return NULL;
+
fenced_mgr = (struct fenced_pb_manager *)CALLOC(1, sizeof(*fenced_mgr));
if (!fenced_mgr)
return NULL;