I think there are a few complexities around when closing the final windows in wxWidgets. I don't know if you remember some months ago a user reporting memory leaks with the wxWidgets examples. I think this came down to the fact that wxWidgets ends the program when its final window is closed without passing control back to the example code meaning that memory allocated there was never released. Perhaps the issues are linked - something to do with wxwidgets have done all its cleaning up, but PLplot expecting to be able to reinitiate something?
If you would like me to have a look into it then if you drop me the segfault example I'll see what it does on my (Windows) system.