Skip to content

Commit

Permalink
Fix crash on resizing unloaded window
Browse files Browse the repository at this point in the history
  • Loading branch information
shinovon committed May 21, 2024
1 parent 08df739 commit 5939659
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/emulator/ui/swt/EmulatorScreen.java
Original file line number Diff line number Diff line change
Expand Up @@ -2185,7 +2185,7 @@ private void resized() {
zoomedHeight = rotation % 2 == 1 ? size.width : size.height;
int w = (int) ((float) zoomedWidth / zoom);
int h = (int) ((float) zoomedHeight / zoom);
if (getWidth() != w || getHeight() != h) {
if (pauseState != 0 && (getWidth() != w || getHeight() != h)) {
initScreenBuffer(w, h);
Emulator.getEventQueue().queue(Integer.MIN_VALUE, w, h);
}
Expand Down

0 comments on commit 5939659

Please sign in to comment.