Add null check on buffer disposal for fx change

This fixes an exception that was being thrown when toggling 3D off and back on with control-M.