From db9cf149e061c5258115c09ee9322ce5d478298d Mon Sep 17 00:00:00 2001 From: yumoqing Date: Tue, 24 Dec 2019 10:16:29 +0800 Subject: [PATCH] bugfix --- kivyblocks/pagescontainer.py | 5 ++++- kivyblocks/vplayer.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/kivyblocks/pagescontainer.py b/kivyblocks/pagescontainer.py index ab0e6f9..9ed33e0 100644 --- a/kivyblocks/pagescontainer.py +++ b/kivyblocks/pagescontainer.py @@ -52,7 +52,10 @@ class PageContainer(FloatLayout): if len(self.pageWidgets) <= 1: return w = self.pageWidgets[-1] - w.beforeDestroy() + try: + w.beforeDestroy() + except: + pass self.pageWidgets = self.pageWidgets[:-1] self.showLastPage() diff --git a/kivyblocks/vplayer.py b/kivyblocks/vplayer.py index 35750f7..e443cfe 100644 --- a/kivyblocks/vplayer.py +++ b/kivyblocks/vplayer.py @@ -194,7 +194,7 @@ class VPlayer(FloatLayout): def beforeDestroy(self): try: - self.stop() + self.pause() except Exception as e: print_exc() return True