Mentions légales du service

Skip to content
Snippets Groups Projects
Commit c6f79866 authored by CANNAROZZO Luigi's avatar CANNAROZZO Luigi Committed by Mathieu Faverge
Browse files

Fix bugs :

- [x] 346098 : Uninitialized scalar field (parser/PajeParser/ParserDefinitionPaje.cpp)
- [x] 346100 : Uninitialized pointer field (trace/Entity.cpp)
- [x] 346101 : Uninitialized scalar field (render/GanttDiagram.hpp)
- [] 346102 : Uninitialized scalar field (render/opengl/Render_opengl.cpp)
- [x] 346103 : Uninitialized pointer field (plugin/Plugin.hpp)
- [x] 346106 : Dereference before null check (trace/Trace.cpp)
- [x] 346110 : Uninitialized scalar field (render/Geometry.cpp)
- [] 346113 : Dereference after null check (parser/Pajeparser/ParserEventPaje.cpp ) //not a real error
- [x] 352437 : Explicit null dereferenced (interface/Node_select.cpp)
- [x] 352438 : Explicit null dereferenced (common/Session.cpp)

Signed-off-by: default avatarCANNAROZZO Luigi <lcannarozzo@enseirb-matmeca.fr>
parent 50c45239
No related branches found
No related tags found
No related merge requests found
......@@ -300,7 +300,7 @@ Palette *Session::get_palette(const std::string &type, const std::string &palett
where_from = &_palettes_event;
}
if(!p || p->get_name() != palette_name) {
if((!p || p->get_name() != palette_name) && where_from != NULL) {
delete p;
QMap <QString, QVariant> qmap = S->value(QString::fromStdString(type+"/"+palette_name+"/map")).toMap();
......
......@@ -166,7 +166,7 @@ void Node_select::set_container_names_rec(QTreeWidgetItem *current_node, Contain
if(load_view==true) {
children = current_container->get_view_children();
}
if(load_view==false || children->empty()) {
else if(load_view==false) {
children = current_container->get_children();
}
//QFlags<Qt::ItemFlag> flg= Qt::ItemIsDragEnabled;
......
......@@ -90,6 +90,7 @@ int ParserDefinitionPaje::_nbparsers = 0;
ParserDefinitionPaje::ParserDefinitionPaje() {
int i;
_nbFieldNames = FIELDNAME_SIZE;
_state = _OUT_A_DEFINITION;
_defid = 0;
_nbparsers++;
......@@ -127,7 +128,6 @@ ParserDefinitionPaje::ParserDefinitionPaje() {
INSERT_FNAME(Line, _FieldType_Int | _FieldType_String );
// Initialize the map between the field names and the associated id
_nbFieldNames = FIELDNAME_SIZE;
for(i=0; i<FIELDNAME_SIZE; i++) {
_FNameStr2Id.insert(pair<string, int>(_FieldNames[i]._name, i));
}
......
......@@ -63,7 +63,7 @@ public:
* \fn Plugin(QWidget *parent = 0)
* \brief Default constructor
*/
Plugin(QWidget *parent = nullptr) : QWidget(parent){}
Plugin(QWidget *parent = nullptr) : QWidget(parent), _trace(nullptr){}
/*!
* \fn init()
* \brief Initialize the plugin
......
......@@ -114,6 +114,7 @@ public:
*/
GanttDiagram( Render *instance ) {
_render = instance;
_start_new_line = false;
}
/*!
......
......@@ -73,15 +73,16 @@ Geometry::Geometry(){
/* Camera is placed on (0,0,0) and looks to (0,0,-1) */
_z_ruler_over = -0.4;
_z_ruler = -0.5;
_z_ruler_over = -0.4;
_z_ruler_under = -0.6;
_z_container = -1.0;
_z_container_under = -1.2;
_z_arrow = -3.0;/* closer to camera than containers or states (MUST be negative)*/
_z_state = -5.0;
_z_event = -2.0;/* closer to camera than containers or states (MUST be negative)*/
_z_arrow = -3.0;/* closer to camera than containers or states (MUST be negative)*/
_z_counter = -4.0;
_z_state = -5.0;
_ruler_distance = 0.0;
}
......
......@@ -55,6 +55,7 @@
using namespace std;
Entity::Entity(Container *container, map<std::string, Value *> opt): _container(container)/*, _extra_fields(opt)*/ {
_container = nullptr;
if(opt.empty()) {
_extra_fields=nullptr;
}
......
......@@ -415,7 +415,7 @@ Trace::start_link(Date &time, LinkType *type,
EntityValue *EV = search_entity_value( type->get_alias(), type );
assert(EV);
if (ancestor && type && source)
if (ancestor && source)
ancestor->start_link(time, type, source, EV, key, opt);
if (time > _max_date)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment