mirror of
https://github.com/badvision/jace.git
synced 2024-11-28 10:52:33 +00:00
Fixed bug caused by switch to Optional usage, caused disk changes to not work properly
This commit is contained in:
parent
a9132f8e76
commit
3231ac3f37
@ -170,8 +170,8 @@ public class Apple2e extends Computer {
|
||||
}
|
||||
|
||||
private void insertCard(Class<? extends Card> type, int slot) throws NoSuchMethodException, IllegalArgumentException, InvocationTargetException {
|
||||
if (getMemory().getCard(slot) != null) {
|
||||
if (getMemory().getCard(slot).getClass().equals(type)) {
|
||||
if (getMemory().getCard(slot).isPresent()) {
|
||||
if (getMemory().getCard(slot).get().getClass().equals(type)) {
|
||||
return;
|
||||
}
|
||||
getMemory().removeCard(slot);
|
||||
|
Loading…
Reference in New Issue
Block a user