8e4fa81 Fix segfaults when NULL buffer is passed in.

Authored and Committed by simo 11 years ago
    Fix segfaults when NULL buffer is passed in.