Move an assert() to avoid core dumps when a static buffer hasn't been given.