Protect against null paths. Don't know if it can happen, but it is worth checking.

This commit is contained in:
Charles Haley 2010-06-18 12:17:47 +01:00
parent d472d64b31
commit 03caaa0eeb

View File

@ -427,7 +427,7 @@ class AddAction(object): # {{{
d = error_dialog(self, _('Add to library'), _('No book selected'))
d.exec_()
return
paths = view._model.paths(rows)
paths = [p for p in view._model.paths(rows) if p is not None]
from calibre.gui2.add import Adder
self.__adder_func = partial(self._add_from_device_adder, on_card=None,
model=view._model)