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.
Merge pull request #565 from LLK/toggle-3d-fix

Add null check on buffer disposal for fx change