Protect against divide by zero.  Fixes Coverity 746808