mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-20 03:24:54 +00:00
[GtkUI] Fix ZeroDivisionError in piecesbar
While waiting for metadata for a magnet, self.__num_pieces is zero.
This commit is contained in:
parent
db1b427b3f
commit
6b630c9fd2
1 changed files with 3 additions and 3 deletions
|
@ -73,12 +73,12 @@ class PiecesBar(gtk.DrawingArea):
|
|||
# Restrict Cairo to the exposed area; avoid extra work
|
||||
self.__roundcorners_clipping()
|
||||
|
||||
if not self.__pieces and self.__num_pieces is not None:
|
||||
if self.__pieces:
|
||||
self.__draw_pieces()
|
||||
elif self.__num_pieces:
|
||||
# Special case. Completed torrents do not send any pieces in their
|
||||
# status.
|
||||
self.__draw_pieces_completed()
|
||||
elif self.__pieces:
|
||||
self.__draw_pieces()
|
||||
|
||||
self.__draw_progress_overlay()
|
||||
self.__write_text()
|
||||
|
|
Loading…
Add table
Reference in a new issue