Check for data size on resize

Avoids extra calculations when no data.