diff --git a/src/deluge_core.cpp b/src/deluge_core.cpp index 4282e1e28..9cbfa1daf 100644 --- a/src/deluge_core.cpp +++ b/src/deluge_core.cpp @@ -763,7 +763,7 @@ static PyObject *torrent_has_piece(PyObject *self, PyObject *args) return NULL; torrent_status s = M_torrents->at(index).handle.status(); - if ((*s.pieces).size() == 0) + if (s.pieces == 0) return Py_BuildValue("b", false); has_piece = internal_has_piece(*s.pieces, piece_index); return Py_BuildValue("b", has_piece);