From dba68c587604ef5d2b5849ad7110116db584e5cf Mon Sep 17 00:00:00 2001 From: SNoiraud Date: Sat, 19 Mar 2016 23:43:12 +0100 Subject: [PATCH] 9278: Crash when dragging multiple media items to clipboard --- gramps/gui/clipboard.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gramps/gui/clipboard.py b/gramps/gui/clipboard.py index 783231cbb..34f2aaf06 100644 --- a/gramps/gui/clipboard.py +++ b/gramps/gui/clipboard.py @@ -864,8 +864,10 @@ class ClipDropList(object): retval = [] for (target, handle) in handles: _class = map2class(target) - obj = _class(self._dbstate, pickle.dumps((target, id, handle, timestamp))) - retval.append(obj) + if _class: + obj = _class(self._dbstate, pickle.dumps((target, id, handle, timestamp))) + if obj: + retval.append(obj) return retval class ClipDropRawList(ClipDropList):