Merge pull request #393 from skyedeving/fix-empty_sm_packet-crash
Add arup_clear() and clear arup when fetching new areas
This commit is contained in:
		
						commit
						812d04d969
					
				@ -92,6 +92,13 @@ public:
 | 
				
			|||||||
    arup_locks.append(locked);
 | 
					    arup_locks.append(locked);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  void arup_clear() {
 | 
				
			||||||
 | 
					    arup_players.clear();
 | 
				
			||||||
 | 
					    arup_statuses.clear();
 | 
				
			||||||
 | 
					    arup_cms.clear();
 | 
				
			||||||
 | 
					    arup_locks.clear();
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  void arup_modify(int type, int place, QString value)
 | 
					  void arup_modify(int type, int place, QString value)
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    if (type == 0) {
 | 
					    if (type == 0) {
 | 
				
			||||||
 | 
				
			|||||||
@ -413,9 +413,11 @@ void AOApplication::server_packet_received(AOPacket *p_packet)
 | 
				
			|||||||
      goto end;
 | 
					      goto end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    w_courtroom->clear_areas();
 | 
					    w_courtroom->clear_areas();
 | 
				
			||||||
 | 
					    w_courtroom->arup_clear();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    for (int n_element = 0; n_element < f_contents.size(); ++n_element) {
 | 
					    for (int n_element = 0; n_element < f_contents.size(); ++n_element) {
 | 
				
			||||||
      w_courtroom->append_area(f_contents.at(n_element));
 | 
					      w_courtroom->append_area(f_contents.at(n_element));
 | 
				
			||||||
 | 
					      w_courtroom->arup_append(0, "Unknown", "Unknown", "Unknown");
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    w_courtroom->list_areas();
 | 
					    w_courtroom->list_areas();
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user