Fixes a potential NPE in adapter if block driver returns null environment.