Note: Assuming your code is like above, where you are calling mraa init and and I2c init, MRAA should be setting this up.
First thing is to make sure your MRAA is up to date. Also do you have simple program that illustrates this?
Might be interesting to try it out. Could simply be a bug in MRAA where some init fails, so some pointer is NULL and then
someone uses pointer...
Kurt