Bug 299588 [Forms] Widget disposed exception when closing shell from a FormText selection
bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/FormText.java
p
					.paint(textGC, repaintRegion, resourceTable, selectedLink,
							selData);
		}
		if (hasFocus && !model.hasFocusSegments())
			textGC.drawFocus(x, y, width, height);
		textGC.dispose();
		gc.drawImage(textBuffer, x, y);
		textBuffer.dispose();
	}
	private int getParagraphSpacing(int lineHeight) {
		return lineHeight / 2;
	}
	private void paintFocusTransfer(IHyperlinkSegment oldLink,
			IHyperlinkSegment newLink) {
		GC gc = new GC(this);
		Color bg = getBackground();
		Color fg = getForeground();
		gc.setFont(getFont());
		if (oldLink != null) {
			gc.setBackground(bg);
			gc.setForeground(fg);
			oldLink.paintFocus(gc, bg, fg, false, null);
		}
		if (newLink != null) {
			
			gc.setBackground(bg);
			gc.setForeground(fg);
			newLink.paintFocus(gc, bg, fg, true, null);
		}