[comp.sys.mac.programmer] Strange Problem with SetPort & DisposDialog

wildfire@aix01.aix.rpi.edu (Douglas B Rusch) (05/08/91)

I had a strange data bus error that I couldn't track down for the longest time.
I finally seem to have fixed it by replacing the following code :

GetPort(&savePort);
SetPort(theDialog);
...
HideWindow(theDialog);
DisposDialog(theDialog);
SetPort(savePort);

with this code :

GetPort(&savePort);
SetPort(theDialog);
...
SetPort(savePort);
HideWindow(theDialog);
DisposDialog(theDialog); 

What I would like to know is if there really is an error in the original code,
so that I'm not just making a phantom fix to my program.

wildfire@aix.rpi.edu