mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	xcb: Ensure the XCB connection is valid before using it.
This commit is contained in:
		
							parent
							
								
									eef247b57e
								
							
						
					
					
						commit
						2c564f2e9e
					
				
					 2 changed files with 10 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -55,6 +55,11 @@ int pa_client_conf_from_x11(pa_client_conf *c, const char *dname) {
 | 
			
		|||
        goto finish;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (xcb_connection_has_error(xcb)) {
 | 
			
		||||
        pa_log(_("xcb_connection_has_error() returned true"));
 | 
			
		||||
        goto finish;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (pa_x11_get_prop(xcb, "PULSE_SERVER", t, sizeof(t))) {
 | 
			
		||||
        pa_bool_t disable_autospawn = TRUE;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -100,6 +100,11 @@ int main(int argc, char *argv[]) {
 | 
			
		|||
        goto finish;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (xcb_connection_has_error(xcb)) {
 | 
			
		||||
        pa_log(_("xcb_connection_has_error() returned true"));
 | 
			
		||||
        goto finish;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    switch (mode) {
 | 
			
		||||
        case DUMP: {
 | 
			
		||||
            char t[1024];
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue