mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Protect against null paths. Don't know if it can happen, but it is worth checking.
This commit is contained in:
parent
d472d64b31
commit
03caaa0eeb
@ -427,7 +427,7 @@ class AddAction(object): # {{{
|
|||||||
d = error_dialog(self, _('Add to library'), _('No book selected'))
|
d = error_dialog(self, _('Add to library'), _('No book selected'))
|
||||||
d.exec_()
|
d.exec_()
|
||||||
return
|
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
|
from calibre.gui2.add import Adder
|
||||||
self.__adder_func = partial(self._add_from_device_adder, on_card=None,
|
self.__adder_func = partial(self._add_from_device_adder, on_card=None,
|
||||||
model=view._model)
|
model=view._model)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user