From 548e830fdcd0547d7831b7745f64a0138dedb323 Mon Sep 17 00:00:00 2001 From: chrox Date: Tue, 25 Nov 2014 11:02:33 +0800 Subject: [PATCH] fix crash when highlighting text in EPUB documents Since the new Screen:getSize modthod returns a regular table instead of a Geom which is set to the dimen field of readerview, there is no copy method in the dimen field. And we don't need to copy dimen any more since the result won't be modified. Even the screen page area somehow needs to be modified, the caller of this function should make a copy of that variable by itself. --- frontend/apps/reader/modules/readerview.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/apps/reader/modules/readerview.lua b/frontend/apps/reader/modules/readerview.lua index 9d9250655..e9f7c0273 100644 --- a/frontend/apps/reader/modules/readerview.lua +++ b/frontend/apps/reader/modules/readerview.lua @@ -223,7 +223,7 @@ function ReaderView:getScreenPageArea(page) return area end else - return self.dimen:copy() + return self.dimen end end