From coverity: trayItem.getImage may return null

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@2259 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2014-03-17 23:01:40 +00:00
parent 3a56ffbe61
commit ba7e4cc65b
1 changed files with 2 additions and 1 deletions

View File

@ -78,7 +78,8 @@ public class SwtGatewayTray implements DavGatewayTrayInterface {
isActive = true;
display.syncExec(new Runnable() {
public void run() {
if (trayItem.getImage().equals(image)) {
Image currentImage = trayItem.getImage();
if (currentImage != null && currentImage.equals(image)) {
trayItem.setImage(image2);
} else {
trayItem.setImage(image);