Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/readactivity.py
diff options
context:
space:
mode:
authorGonzalo Odiard <godiard@gmail.com>2013-09-05 19:05:16 (GMT)
committer Gonzalo Odiard <godiard@gmail.com>2013-09-05 21:44:59 (GMT)
commitef8b57606d8f4d49354d5019317ecc649ecdf521 (patch)
tree4093b7a325c60aac3fda496f1cb6e31f7b31e5f7 /readactivity.py
parentfeefe95ad35f9d74afb2266d7111c1500f3b6ff2 (diff)
Don't crash if the book have bookmarks saved, but can't open the preview
If the preview can't be opened or created, create a image with a number showing the page number. Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
Diffstat (limited to 'readactivity.py')
-rw-r--r--readactivity.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/readactivity.py b/readactivity.py
index 2714ccc..1aed546 100644
--- a/readactivity.py
+++ b/readactivity.py
@@ -1202,6 +1202,9 @@ class ReadActivity(activity.Activity):
return None
window = self.canvas.get_window()
+ if window is None:
+ return None
+
alloc = self.canvas.get_allocation()
dummy_cr = Gdk.cairo_create(window)