mirror of
				https://github.com/Ryujinx/SDL.git
				synced 2025-11-04 15:34:58 +00:00 
			
		
		
		
	Fix potential de-referencing null pointer in SDL_EVDEV_kbd_keycode()
This commit is contained in:
		
							parent
							
								
									e7376b7b74
								
							
						
					
					
						commit
						d948e6c3c5
					
				| 
						 | 
					@ -476,12 +476,12 @@ void SDL_EVDEV_kbd_keycode(SDL_EVDEV_keyboard_state *kbd, unsigned int keycode,
 | 
				
			||||||
    unsigned int final_key_state;
 | 
					    unsigned int final_key_state;
 | 
				
			||||||
    unsigned int map_from_key_sym;
 | 
					    unsigned int map_from_key_sym;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    key_map = *kbd->key_map;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (kbd == NULL) {
 | 
					    if (kbd == NULL) {
 | 
				
			||||||
        return;
 | 
					        return;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    key_map = *kbd->key_map;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    kbd->rep = (down == 2);
 | 
					    kbd->rep = (down == 2);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (keycode < NUM_KEYS) {
 | 
					    if (keycode < NUM_KEYS) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue