 Further, the consequences may not be serious, as the program may already be crashing due to failure to acquire an essential resource.However, these can prevent recovery from the failure, or turn an orderly shutdown into a disorderly shutdown.This condition is generally ensured by first checking that the resource was successfully acquired before releasing it, either by having a boolean variable to record "successfully acquired" – which lacks atomicity if the resource is acquired but the flag variable fails to be updated, or conversely – or by the handle to the resource being a nullable type, where "null" indicates "not successfully acquired", which ensures atomicity.