--- a/org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/preview/AbstractPreviewPage.java Mon Feb 15 13:46:26 2010 -0800
+++ b/org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/preview/AbstractPreviewPage.java Mon Feb 15 14:25:05 2010 -0800
@@ -114,18 +114,19 @@
protected synchronized void refresh(boolean manual) {
try {
- final Control focusControl = browser.getDisplay().getFocusControl();
- browser.refresh();
- refreshAction.setImageDescriptor(PreviewerPlugin
- .getImageDescriptor(Images.GREEN_SYNC));
- if (!manual && focusControl != null) {
- asyncExec(new Runnable() {
- public void run() {
- focusControl.setFocus();
- }
- });
+ if (!browser.isDisposed()) {
+ final Control focusControl = browser.getDisplay().getFocusControl();
+ browser.refresh();
+ refreshAction.setImageDescriptor(PreviewerPlugin.getImageDescriptor(Images.GREEN_SYNC));
+ if (!manual && focusControl != null) {
+ asyncExec(new Runnable() {
+ public void run() {
+ focusControl.setFocus();
+ }
+ });
+ }
+ refreshAction.setToolTipText("Refresh the preview browser");
}
- refreshAction.setToolTipText("Refresh the preview browser");
needsRefresh = false;
} finally {
refreshScheduled = false;