From dc7a76197d3a68d72948af2419d1a8ab4b699379 Mon Sep 17 00:00:00 2001 From: Brian Clements Date: Fri, 27 Jun 2014 16:29:53 -0500 Subject: [PATCH] Omaha #3323 fixed collaboration disposed font issue Change-Id: I89fda01efad46299a08b3067edc3f16a812a31c2 Former-commit-id: e216af49d135ceeff5e6cd251c6742602230553c --- .../viz/collaboration/ui/session/AbstractSessionView.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cave/com.raytheon.uf.viz.collaboration.ui/src/com/raytheon/uf/viz/collaboration/ui/session/AbstractSessionView.java b/cave/com.raytheon.uf.viz.collaboration.ui/src/com/raytheon/uf/viz/collaboration/ui/session/AbstractSessionView.java index 1d08c131f1..f7e2c95fd5 100644 --- a/cave/com.raytheon.uf.viz.collaboration.ui/src/com/raytheon/uf/viz/collaboration/ui/session/AbstractSessionView.java +++ b/cave/com.raytheon.uf.viz.collaboration.ui/src/com/raytheon/uf/viz/collaboration/ui/session/AbstractSessionView.java @@ -92,6 +92,7 @@ import com.raytheon.viz.ui.views.CaveFloatingView; * running in an asynchronous thread. * Mar 11, 2014 #2865 lvenable Added null checks for msgArchive. * Jun 20, 2014 3281 bclement made sendErrorMessage() public + * Jun 27, 2014 3323 bclement fixed disposed font issue * * * @author rferrel @@ -572,11 +573,12 @@ public abstract class AbstractSessionView extends @Subscribe public void changeFont(FontData data) { - if (messagesTextFont != null) { - messagesTextFont.dispose(); - } + Font oldFont = messagesTextFont; messagesTextFont = new Font(Display.getCurrent(), data); messagesText.setFont(messagesTextFont); + if (oldFont != null) { + oldFont.dispose(); + } } public void setAlertWords(List words) {