pipebuffer: Fix alignment assertion.

This commit is contained in:
José Fonseca 2009-01-28 15:53:09 +00:00
parent 665d6d6c1e
commit 815de0a5df

View file

@ -154,8 +154,8 @@ mm_bufmgr_create_buffer(struct pb_manager *mgr,
struct mm_buffer *mm_buf;
/* We don't handle alignments larger then the one initially setup */
assert(desc->alignment % (1 << mm->align2) == 0);
if(desc->alignment % (1 << mm->align2))
assert(pb_check_alignment(desc->alignment, 1 << mm->align2));
if(!pb_check_alignment(desc->alignment, 1 << mm->align2))
return NULL;
pipe_mutex_lock(mm->mutex);