From 673ef45d66a28e0ad46e9a67f1fcca6b3fdf0709 Mon Sep 17 00:00:00 2001 From: "Marshall T. Vandegrift" Date: Mon, 11 Aug 2008 12:32:02 -0400 Subject: [PATCH] Fix #938 (lit2oeb: Crash converting some LIT files) --- src/calibre/ebooks/lit/reader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/ebooks/lit/reader.py b/src/calibre/ebooks/lit/reader.py index 1376363d45..b2effb60b9 100644 --- a/src/calibre/ebooks/lit/reader.py +++ b/src/calibre/ebooks/lit/reader.py @@ -217,7 +217,7 @@ class UnBinary(object): state = 'get attr length' continue attr = None - if oc in current_map and current_map[oc]: + if current_map and oc in current_map and current_map[oc]: attr = current_map[oc] elif oc in self.attr_map: attr = self.attr_map[oc]