提交 586cac13 编写于 作者: S serge-rider

#3048 RSV auto-refresh - NPE fix

上级 8879cdee
......@@ -30,6 +30,8 @@ public class AutoRefreshJob extends AbstractJob {
AutoRefreshJob(AutoRefreshControl refreshControl) {
super("Auto-refresh job (" + refreshControl.getControlId() + ")");
setSystem(true);
setUser(false);
this.refreshControl = refreshControl;
}
......
......@@ -2617,6 +2617,11 @@ public class ResultSetViewer extends Viewer
UIUtils.showMessageBox(viewerPanel.getShell(), "Data read", "Data read is in progress - can't run another", SWT.ICON_WARNING);
return false;
}
DBCExecutionContext executionContext = getExecutionContext();
if (executionContext == null) {
UIUtils.showMessageBox(viewerPanel.getShell(), "Data read", "Can't read data - no active connection", SWT.ICON_WARNING);
return false;
}
// Cancel any refresh jobs
autoRefreshControl.cancelRefresh();
......@@ -2633,7 +2638,7 @@ public class ResultSetViewer extends Viewer
dataContainer,
useDataFilter,
this,
getExecutionContext(),
executionContext,
progressControl);
dataPumpJob.addJobChangeListener(new JobChangeAdapter() {
@Override
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册