When a new scene is created, the paint pointers are not available before using them, so the python panel exits because the pointer was None. Now, the pointer is checked in order to display the materials panel as expected.
When a new scene is created, the paint pointers are not available before using them, so the python panel exits because the pointer was None. Now, the pointer is checked in order to display the materials panel as expected.