mirror of
				https://github.com/Ryujinx/SDL.git
				synced 2025-11-04 12:55:06 +00:00 
			
		
		
		
	wayland: Only call libdecor_dispatch() if we've loaded libdecor
As of #5703, we call libdecor_dispatch() in Wayland_WaitEventTimeout(), but this will crash if we don't load libdecor, as SDL_VideoData::shell.libdecor will be NULL. Since we don't load libdecor if we don't intend to use it (i.e., if should_use_libdecor returns false), this results in a crash under KDE in almost all circumstances.
This commit is contained in:
		
							parent
							
								
									7fa46ec40b
								
							
						
					
					
						commit
						847539afeb
					
				| 
						 | 
					@ -295,7 +295,9 @@ Wayland_WaitEventTimeout(_THIS, int timeout)
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef HAVE_LIBDECOR_H
 | 
					#ifdef HAVE_LIBDECOR_H
 | 
				
			||||||
    libdecor_dispatch(d->shell.libdecor, timeout);
 | 
					    if (d->shell.libdecor) {
 | 
				
			||||||
 | 
					        libdecor_dispatch(d->shell.libdecor, timeout);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* wl_display_prepare_read() will return -1 if the default queue is not empty.
 | 
					    /* wl_display_prepare_read() will return -1 if the default queue is not empty.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue