mirror of
https://github.com/badvision/jace.git
synced 2024-11-28 10:52:33 +00:00
Make sure CPU exists on computer object before trying to use it
This commit is contained in:
parent
430ab4e4de
commit
3bca1f29c0
@ -129,12 +129,14 @@ public class CardMassStorage extends Card implements MediaConsumerParent {
|
|||||||
@Override
|
@Override
|
||||||
public void reconfigure() {
|
public void reconfigure() {
|
||||||
unregisterListeners();
|
unregisterListeners();
|
||||||
int pc = computer.getCpu().getProgramCounter();
|
if (computer.getCpu() != null) {
|
||||||
if (drive1.getCurrentDisk() != null && getSlot() == 7 && (pc >= 0x0c65e && pc <= 0x0c66F)) {
|
int pc = computer.getCpu().getProgramCounter();
|
||||||
// If the computer is in a loop trying to boot from cards 6, fast-boot from here instead
|
if (drive1.getCurrentDisk() != null && getSlot() == 7 && (pc >= 0x0c65e && pc <= 0x0c66F)) {
|
||||||
// This is a convenience to boot a hard-drive if the emulator has started waiting for a currentDisk
|
// If the computer is in a loop trying to boot from cards 6, fast-boot from here instead
|
||||||
currentDrive = drive1;
|
// This is a convenience to boot a hard-drive if the emulator has started waiting for a currentDisk
|
||||||
EmulatorUILogic.simulateCtrlAppleReset();
|
currentDrive = drive1;
|
||||||
|
EmulatorUILogic.simulateCtrlAppleReset();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
registerListeners();
|
registerListeners();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user