Page Setup Dialog

I wrote a little script to test wx.PageSetupDialog

class DialogTestFrame(wx.Frame):

    def __init__(self, parent):
        wx.Frame.__init__(self, parent)
        sizer = wx.BoxSizer(wx.HORIZONTAL)
        btnSetup = wx.Button(self, label='Setup')
        self.Bind(wx.EVT_BUTTON, self.OnSetup, btnSetup)
        sizer.Add(btnSetup)
        self.SetSizer(sizer)
        self.CenterOnScreen()
        self.data = wx.PageSetupDialogData(wx.PrintData())

    def OnSetup(self, evt):
        dlg = wx.PageSetupDialog(self, self.data)
        if dlg.ShowModal() == wx.ID_OK:
            data1 = dlg.GetPageSetupDialogData()
      # compare data before (self.data) and data after (data1)
            self.data = data1
        dlg.Destroy()

What I wanted this code to do was pop up a Page Setup Dialog, allow me
to change the options and then display the changes. Then, I wanted to
be able to redisplay the dialog and see that the changes I made the
first time were still there.

However, this code generates as Segment Fault when I try to bring up the
dialog a second time. If I comment out the self.data = data1 code, I
don't get a Segment Fault. Is there something in the
wx.PageSetupDialogData object that isn't getting cleaned up properly?

Mark