Mentions légales du service

Skip to content
Snippets Groups Projects

Fix Dereferencing _main_window where it could have been null

Merged ORDRONNEAU Camille requested to merge cordronn/vite:fix/main-window-deref into master
1 file
+ 7
6
Compare changes
  • Side-by-side
  • Inline
+ 7
6
@@ -405,8 +405,6 @@ bool Core::draw_trace(const string &filename, const int format) {
ostringstream buf_txt;
int time_buf = 0;
_main_window->opening_file(filename); /* Must be called after binding the render area to the main window */
// Select the Parser in function of the file's extension
if (!ParserFactory::create(&parser, filename)) {
*Message::get_instance() << QObject::tr("Error : parser not found for input file").toStdString() << Message::ende;
@@ -810,10 +808,13 @@ void Core::launch_action(int state, void *arg) {
Error::print_numbers();
Error::flush("log.txt");
}
else if (false == draw_trace(_file_opened, _DRAW_OPENGL)) {
message << QObject::tr("Draw trace failed").toStdString()
<< Message::ende;
break;
else {
_main_window->opening_file(_file_opened); /* Must be called after binding the render area to the main window */
if (false == draw_trace(_file_opened, _DRAW_OPENGL)) {
message << QObject::tr("Draw trace failed").toStdString()
<< Message::ende;
break;
}
}
}
Loading