Maybe you've just switched to Irrlicht 1.3 and your custom scene nodes are crashing in the getMaterial method. That's because we've changed the single parameter from a s32 to an u32, so your overridden method won't get called. Solution: change your parameter in getMaterial to u32 as well.
Unfortunately, C++ doesn't have a Override keyword such as C# or Java 5 have, which would have prevented that problem. Sorry to write this specific thing here, but a lot of people kept asking this. Maybe I should add this into the wiki