mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-10-29 05:40:27 -04:00 
			
		
		
		
	alsa: handle plugin errors better
When the plugins can't be loaded, we fail to make a main_loop. Handle this case instead of segfaulting. See #1239
This commit is contained in:
		
							parent
							
								
									913434167d
								
							
						
					
					
						commit
						5a186ece01
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		|  | @ -1015,6 +1015,10 @@ static int snd_pcm_pipewire_open(snd_pcm_t **pcmp, const char *name, | |||
| 	} | ||||
| 
 | ||||
| 	pw->main_loop = pw_thread_loop_new("alsa-pipewire", NULL); | ||||
| 	if (pw->main_loop == NULL) { | ||||
| 		err = -errno; | ||||
| 		goto error; | ||||
| 	} | ||||
| 	loop = pw_thread_loop_get_loop(pw->main_loop); | ||||
| 	pw->system = loop->system; | ||||
| 	if ((pw->context = pw_context_new(loop, NULL, 0)) == NULL) { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Wim Taymans
						Wim Taymans