File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -1291,10 +1291,12 @@ internal void VMPowerOff()
12911291 {
12921292 toggleConsoleButton . Enabled = false ;
12931293
1294- VBD cddrive = source . FindVMCDROM ( ) ;
1295- bool allowEject = cddrive != null ? cddrive . allowed_operations . Contains ( vbd_operations . eject ) : false ;
1296- bool allowInsert = cddrive != null ? cddrive . allowed_operations . Contains ( vbd_operations . insert ) : false ;
1297- multipleDvdIsoList1 . Enabled = ( source . power_state == vm_power_state . Halted ) && ( allowEject || allowInsert ) ;
1294+ VBD cdDrive = source . FindVMCDROM ( ) ;
1295+
1296+ multipleDvdIsoList1 . Enabled = cdDrive == null ||
1297+ source . power_state == vm_power_state . Halted &&
1298+ ( cdDrive . allowed_operations . Contains ( vbd_operations . eject ) ||
1299+ cdDrive . allowed_operations . Contains ( vbd_operations . insert ) ) ;
12981300
12991301 sendCAD . Enabled = false ;
13001302 }
You can’t perform that action at this time.
0 commit comments