mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-11-24 02:59:07 +08:00
Fix CID 1386083 (Dereference null return value)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
parent
2a30d77d75
commit
244b54bfc9
@ -28,6 +28,7 @@ import java.awt.event.KeyEvent;
|
||||
import java.awt.event.KeyListener;
|
||||
import java.awt.event.WindowEvent;
|
||||
import java.awt.event.WindowListener;
|
||||
import java.awt.Window;
|
||||
|
||||
import javax.swing.Timer;
|
||||
|
||||
@ -262,7 +263,10 @@ public class SVEventHandler extends PBasicInputEventHandler implements
|
||||
public void windowClosing(WindowEvent e) {
|
||||
processEvent(new SVEvent(SVEventType.SVET_DESTROY, svWindow, lastXMove,
|
||||
lastYMove, 0, 0, null));
|
||||
e.getWindow().dispose();
|
||||
Window w = e.getWindow();
|
||||
if (w != null) {
|
||||
w.dispose();
|
||||
}
|
||||
SVWindow.nrWindows--;
|
||||
if (SVWindow.nrWindows == 0) {
|
||||
processEvent(new SVEvent(SVEventType.SVET_EXIT, svWindow, lastXMove,
|
||||
|
Loading…
Reference in New Issue
Block a user