Commit 1da1c795 authored by Augustin Degomme's avatar Augustin Degomme

removes a segfault occuring with 1253 when no type was set to visible

parent fbd50f13
......@@ -250,6 +250,8 @@ void Session::remove_state_to_palette(const std::string &palette_name, const std
settings.setValue(name, qmap);
}
void Session::set_custom_types(bool b){
if(_link_types==NULL)_link_types=new std::list<std::string>();
if(_event_types==NULL)_event_types=new std::list<std::string>();
_custom_types=b;
}
......@@ -274,12 +276,12 @@ void Session::clear_event_type(){
}
void Session::add_link_type(std::string name){
if(_link_types==NULL)_link_types=new std::list<std::string>();
//if(_link_types==NULL)_link_types=new std::list<std::string>();
_link_types->push_back(name);
}
void Session::add_event_type(std::string name){
if(_event_types==NULL)_event_types=new std::list<std::string>();
//if(_event_types==NULL)_event_types=new std::list<std::string>();
_event_types->push_back(name);
}
......@@ -451,10 +451,10 @@ public:
if (link->get_type()){
const std::list<std::string> * link_types = Session::get_link_types();
for(std::list<std::string>::const_iterator it= link_types->begin();
it!= link_types->end();
it++ ){
if(*it == link->get_type()->get_name().to_string()){
for(std::list<std::string>::const_iterator it2= link_types->begin();
it2!= link_types->end();
it2++ ){
if(*it2 == link->get_type()->get_name().to_string()){
display=true;
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment