fix segfault on ATI 7950, don't copy buffers with 0 size in buffer_resize