avf_showwaves: fix null pointer dereference