|
From: Kevin A. <ka...@us...> - 2005-03-28 17:29:48
|
Update of /cvsroot/pythoncard/PythonCard/components In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24566/components Modified Files: textfield.py Log Message: added IsBeingDeleted() guard to prevent firing events when object is in the process of being deleted, which could cause crashes if the handler attempts to access a deleted object Index: textfield.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/components/textfield.py,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** textfield.py 25 Sep 2004 03:21:20 -0000 1.30 --- textfield.py 28 Mar 2005 17:29:39 -0000 1.31 *************** *** 315,319 **** # same with DiscardEdits() above #modified = obj.IsModified() ! if aWxEvent.target.IsModified(): #closeFieldEvent = aWxEvent.Clone() #closeFieldEvent.SetEventType(event.wxEVT_CLOSE_FIELD) --- 315,319 ---- # same with DiscardEdits() above #modified = obj.IsModified() ! if not aWxEvent.target.IsBeingDeleted() and aWxEvent.target.IsModified(): #closeFieldEvent = aWxEvent.Clone() #closeFieldEvent.SetEventType(event.wxEVT_CLOSE_FIELD) |