check that progress bar is visible before disposing

This commit is contained in:
fros4943 2007-03-23 11:16:53 +00:00
parent 013701f50c
commit cf96c89934

View file

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* $Id: ContikiMoteTypeDialog.java,v 1.20 2007/03/22 22:20:33 fros4943 Exp $ * $Id: ContikiMoteTypeDialog.java,v 1.21 2007/03/23 11:16:53 fros4943 Exp $
*/ */
package se.sics.cooja.contikimote; package se.sics.cooja.contikimote;
@ -962,8 +962,10 @@ public class ContikiMoteTypeDialog extends JDialog {
if (compilationThread != null && compilationThread.isAlive()) { if (compilationThread != null && compilationThread.isAlive()) {
compilationThread.interrupt(); compilationThread.interrupt();
} }
if (progressDialog != null && progressDialog.isVisible()) {
progressDialog.dispose(); progressDialog.dispose();
} }
}
}); });
progressPanel.add(BorderLayout.CENTER, new JScrollPane(taskOutput)); progressPanel.add(BorderLayout.CENTER, new JScrollPane(taskOutput));