mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	bluetooth: Fix check if transport exists before acquire
The transport might have disapeared exactly before acquiring, so we should avoid an assertion failure, in this case inside the function pa_bluetooth_discovery_get_by_path().
This commit is contained in:
		
							parent
							
								
									76248fd8f2
								
							
						
					
					
						commit
						0ee5fa6377
					
				
					 1 changed files with 5 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -327,6 +327,11 @@ static int bt_transport_acquire(struct userdata *u, pa_bool_t start) {
 | 
			
		|||
    const char *accesstype = "rw";
 | 
			
		||||
    const pa_bluetooth_transport *t;
 | 
			
		||||
 | 
			
		||||
    if (u->transport == NULL) {
 | 
			
		||||
        pa_log("Transport no longer available.");
 | 
			
		||||
        return -1;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (bt_transport_is_acquired(u)) {
 | 
			
		||||
        if (start)
 | 
			
		||||
            goto done;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue