mirror of
https://cagebreak.project-repo.co/cagebreak.git
synced 2026-08-09 15:19:11 +02:00
Add support for disabling messages when fuzzing
This commit is contained in:
parent
8ffac22f1b
commit
b11e2409c6
1 changed files with 6 additions and 1 deletions
|
|
@ -46,6 +46,12 @@ create_message_texture(const char *string, const struct cg_output *output) {
|
|||
cairo_surface_t *dummy_surface =
|
||||
cairo_image_surface_create(CAIRO_FORMAT_ARGB32, 0, 0);
|
||||
cairo_t *c = cairo_create(dummy_surface);
|
||||
|
||||
// This occurs when we are fuzzing. In that case, do nothing
|
||||
if(c == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
cairo_set_antialias(c, CAIRO_ANTIALIAS_BEST);
|
||||
cairo_font_options_t *fo = cairo_font_options_create();
|
||||
cairo_font_options_set_hint_style(fo, CAIRO_HINT_STYLE_FULL);
|
||||
|
|
@ -147,7 +153,6 @@ message_printf(struct cg_output *output, const char *fmt, ...) {
|
|||
|
||||
message_set_output(output, buffer, box, CG_MESSAGE_TOP_RIGHT);
|
||||
free(buffer);
|
||||
free(box);
|
||||
alarm(output->server->message_timeout);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue