Prevent possible traceback
This commit is contained in:
		
							parent
							
								
									fddc2e6aa9
								
							
						
					
					
						commit
						cd4a620d94
					
				
					 2 changed files with 4 additions and 0 deletions
				
			
		| 
						 | 
					@ -1768,6 +1768,8 @@ class ChatControl(ChatControlBase):
 | 
				
			||||||
		if not c.resource:
 | 
							if not c.resource:
 | 
				
			||||||
			return
 | 
								return
 | 
				
			||||||
		if target_type == self.TARGET_TYPE_URI_LIST:
 | 
							if target_type == self.TARGET_TYPE_URI_LIST:
 | 
				
			||||||
 | 
								if not selection.data:
 | 
				
			||||||
 | 
									return
 | 
				
			||||||
			uri = selection.data.strip()
 | 
								uri = selection.data.strip()
 | 
				
			||||||
			uri_splitted = uri.split() # we may have more than one file dropped
 | 
								uri_splitted = uri.split() # we may have more than one file dropped
 | 
				
			||||||
			for uri in uri_splitted:
 | 
								for uri in uri_splitted:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1658,6 +1658,8 @@ class GroupchatControl(ChatControlBase):
 | 
				
			||||||
		# Invite contact to groupchat
 | 
							# Invite contact to groupchat
 | 
				
			||||||
		treeview = gajim.interface.roster.tree
 | 
							treeview = gajim.interface.roster.tree
 | 
				
			||||||
		model = treeview.get_model()
 | 
							model = treeview.get_model()
 | 
				
			||||||
 | 
							if not selection.data:
 | 
				
			||||||
 | 
								return
 | 
				
			||||||
		data = selection.data
 | 
							data = selection.data
 | 
				
			||||||
		path = treeview.get_selection().get_selected_rows()[1][0]
 | 
							path = treeview.get_selection().get_selected_rows()[1][0]
 | 
				
			||||||
		iter = model.get_iter(path)
 | 
							iter = model.get_iter(path)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue