[PATCH] Add a check that vmdisk and disk variables are not NULL