Please use the SAFE_ASSERT for functions called from scripts. They need to be safe also in release mode and I think warning about errors is in this case better than crashing.