diff options
author | rahulp13 | 2022-02-22 01:23:22 +0530 |
---|---|---|
committer | rahulp13 | 2022-02-22 01:31:40 +0530 |
commit | f79c48908f3a082a70512fbb0f38ec3b0b724e43 (patch) | |
tree | c7d141f306e7030493eacd9388097d55f1324aec | |
parent | c1dcf941062f7c900d6cdb3a40205f3c77d949e4 (diff) | |
download | eSim-f79c48908f3a082a70512fbb0f38ec3b0b724e43.tar.gz eSim-f79c48908f3a082a70512fbb0f38ec3b0b724e43.tar.bz2 eSim-f79c48908f3a082a70512fbb0f38ec3b0b724e43.zip |
Fixed crash issue due to NGHDL invoked without any project
-rw-r--r-- | src/projManagement/Worker.py | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/projManagement/Worker.py b/src/projManagement/Worker.py index 970bfccd..6ff1e361 100644 --- a/src/projManagement/Worker.py +++ b/src/projManagement/Worker.py @@ -16,7 +16,7 @@ # REVISION: Sunday 16 August 2020 # ========================================================================= -from PyQt5 import QtCore +from PyQt5 import QtCore, QtWidgets import subprocess from configuration.Appconfig import Appconfig @@ -97,7 +97,25 @@ class WorkerThread(QtCore.QThread): """ procThread = Appconfig() + projDir = procThread.current_project["ProjectName"] + + if (projDir is None) and ('nghdl' not in command): + msg = QtWidgets.QErrorMessage() + msg.setModal(True) + msg.setWindowTitle("Error Message") + msg.showMessage( + 'Please select the project first. You can either ' + + 'create a new project or open an existing project.' + ) + msg.exec_() + + return + proc = subprocess.Popen(command.split()) + + if 'nghdl' in command: + return + self.my_workers.append(proc) procThread.procThread_list.append(proc) procThread.proc_dict[procThread.current_project['ProjectName']].append( |