added protection against dividing by zero.
added protection against dividing by zero.

CCBUG: 282562

KDE/oxygen-gtk,blueshell-next/carbon-gtk,blueshell-next/carbon-gtk,blue-shell/carbon-gtk,blue-shell/carbon-gtk,KDE/oxygen-gtk