WHY? Stupid problem... why is it doing this?
Posted: Fri Oct 14, 2005 11:14 am
I'm having a problem with a certain line whenever I try to load a model.
scene::IAnimatedMesh* m = Device->getSceneManager()->getMesh(filename);
If I have this line in main() it works. But if I for example put it in LoadModel() and call it from that exact same place, it gives me the System.NullReferenceException error.
I have Device declared as a global
IrrlichtDevice *Device = 0;
and then set it up at the beginning of main()
IrrlichtDevice *Device = createDevice(video::EDT_DIRECTX9,
core::dimension2d<s32>(1024, 768),
16, true, false, false, &receiver);
Does anyone know what could be happening? I've done this exact same thing in other programs without getting this problem.
scene::IAnimatedMesh* m = Device->getSceneManager()->getMesh(filename);
If I have this line in main() it works. But if I for example put it in LoadModel() and call it from that exact same place, it gives me the System.NullReferenceException error.
I have Device declared as a global
IrrlichtDevice *Device = 0;
and then set it up at the beginning of main()
IrrlichtDevice *Device = createDevice(video::EDT_DIRECTX9,
core::dimension2d<s32>(1024, 768),
16, true, false, false, &receiver);
Does anyone know what could be happening? I've done this exact same thing in other programs without getting this problem.