In my opinion, ppEncoder can never be NULL, because it is just the address of a pointer variable. So the assert as well as the if check may not be needed. ?