From 03caaa0eeb9fbfee1e9c3566bdadad672014b2b4 Mon Sep 17 00:00:00 2001 From: Charles Haley <> Date: Fri, 18 Jun 2010 12:17:47 +0100 Subject: [PATCH] Protect against null paths. Don't know if it can happen, but it is worth checking. --- src/calibre/gui2/actions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/gui2/actions.py b/src/calibre/gui2/actions.py index 3391277e9c..ccceb96f91 100644 --- a/src/calibre/gui2/actions.py +++ b/src/calibre/gui2/actions.py @@ -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)