Skip to content

Commit a3b4486

Browse files
committed
tkpanels: fix a few exceptions in AnimPanel
1 parent f32dc3c commit a3b4486

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

direct/src/tkpanels/AnimPanel.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ def loadAnim(self):
276276
title = 'Load Animation',
277277
parent = self.component('hull')
278278
)
279-
if (animFilename == ''):
279+
if not animFilename:
280280
# no file selected, canceled
281281
return
282282

@@ -372,8 +372,9 @@ def setDestroyCallBack(self, callBack):
372372
def destroy(self):
373373
# First clean up
374374
taskMgr.remove(self.id + '_UpdateTask')
375-
self.destroyCallBack()
376-
self.destroyCallBack = None
375+
if self.destroyCallBack is not None:
376+
self.destroyCallBack()
377+
self.destroyCallBack = None
377378
AppShell.destroy(self)
378379

379380
class ActorControl(Pmw.MegaWidget):

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy