зеркало из https://github.com/mozilla/moz-skia.git
Fixes zero division when there are no lines to plot (only one revision in range)
(SkipBuildbotRuns) Review URL: https://codereview.chromium.org/16907003 git-svn-id: http://skia.googlecode.com/svn/trunk@9578 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
Родитель
5f879755f4
Коммит
741b2e1cf1
|
@ -819,6 +819,10 @@ def output_svg(lines, regressions, requested_width, requested_height):
|
||||||
font_size = 16
|
font_size = 16
|
||||||
line_width = 2
|
line_width = 2
|
||||||
|
|
||||||
|
# If there is nothing to see, don't try to draw anything.
|
||||||
|
if w == 0 or h == 0:
|
||||||
|
return
|
||||||
|
|
||||||
pic_width, pic_height = compute_size(requested_width, requested_height
|
pic_width, pic_height = compute_size(requested_width, requested_height
|
||||||
, w, h)
|
, w, h)
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче