- fix: Crash at startup when current problem in the problem set is connected with source file.

This commit is contained in:
Roy Qu 2023-05-03 12:55:19 +08:00
parent b93dac458a
commit 6736524380
4 changed files with 10 additions and 4 deletions

View File

@ -1,3 +1,7 @@
Red Panda C++ Version 2.22
- fix: Crash at startup when current problem in the problem set is connected with source file.
Red Panda C++ Version 2.21 Red Panda C++ Version 2.21
- change: The option "Check for stack smashing attacks (-fstack-protector)" is turned off by default in the Debug compiler set settings. - change: The option "Check for stack smashing attacks (-fstack-protector)" is turned off by default in the Debug compiler set settings.

View File

@ -8,7 +8,7 @@ isEmpty(APP_NAME) {
} }
isEmpty(APP_VERSION) { isEmpty(APP_VERSION) {
APP_VERSION = 2.21 APP_VERSION = 2.22
} }
contains(QMAKE_HOST.arch, x86_64):{ contains(QMAKE_HOST.arch, x86_64):{

View File

@ -4034,8 +4034,10 @@ void MainWindow::onProblemSetIndexChanged(const QModelIndex &current, const QMod
} else { } else {
mProblemSet_RemoveProblem->setEnabled(true); mProblemSet_RemoveProblem->setEnabled(true);
POJProblem problem = mOJProblemSetModel.problem(idx.row()); POJProblem problem = mOJProblemSetModel.problem(idx.row());
if (problem && !problem->answerProgram.isEmpty()) { if (mFullInitialized) {
openFile(problem->answerProgram); if (problem && !problem->answerProgram.isEmpty()) {
openFile(problem->answerProgram);
}
} }
mOJProblemModel.setProblem(problem); mOJProblemModel.setProblem(problem);
updateProblemTitle(); updateProblemTitle();

View File

@ -14,7 +14,7 @@ qsynedit.subdir = libs/qsynedit
APP_NAME = RedPandaCPP APP_NAME = RedPandaCPP
APP_VERSION = 2.21 APP_VERSION = 2.22
# Add the dependencies so that the RedPandaIDE project can add the depended programs # Add the dependencies so that the RedPandaIDE project can add the depended programs
# into the main app bundle # into the main app bundle