You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
When i try open device with Dx9 renderer on system not support this renderer (e.g. win2k) program crash on function createDeviceEx() or createDevice() (don`t return null).
When in file CD3D9Driver.cpp I delete line
dx9->drop();
in function IVideoDriver* createDirectX9Driver(...)
function createDeviceEx() return null,when can`t init device.
The problem is actually not the drop(), but something inside the device destructor. I never had this problem, so it's hard to debug for me. But if you could check which call inside the destructor is actually crashing here, we might be able to fix this problem.
Yes, definitely a bug here. The init method is able to exit before the depth buffer struct is created. I've fixed this in Irrlicht 1.7 branch, will be in 1.7.2. Thanks.