mirror of
				https://gitlab.freedesktop.org/wayland/wayland.git
				synced 2025-11-03 09:01:42 -05:00 
			
		
		
		
	scanner: Fail if there's a 'destroy' request not marked as a destructor
This commit is contained in:
		
							parent
							
								
									c72ebf5df9
								
							
						
					
					
						commit
						a9ac0eb249
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		| 
						 | 
					@ -217,6 +217,9 @@ start_element(void *data, const char *element_name, const char **atts)
 | 
				
			||||||
		else
 | 
							else
 | 
				
			||||||
			message->destructor = 0;
 | 
								message->destructor = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if (strcmp(name, "destroy") == 0 && !message->destructor)
 | 
				
			||||||
 | 
								fail(ctx, "destroy request should be destructor type");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		ctx->message = message;
 | 
							ctx->message = message;
 | 
				
			||||||
	} else if (strcmp(element_name, "arg") == 0) {
 | 
						} else if (strcmp(element_name, "arg") == 0) {
 | 
				
			||||||
		arg = malloc(sizeof *arg);
 | 
							arg = malloc(sizeof *arg);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue