fix crash if class is 0x0
Merge pull request #31 from vixentael/fix-crash

fix crash if class is 0x0