1
0
Fork 0

[Bugfix] Check NULL pointers on QP (#20481)

This commit is contained in:
Pablo Martínez 2023-07-07 16:51:19 +02:00 committed by GitHub
parent 9b3ac793bc
commit d13925be9a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 39 additions and 24 deletions

View file

@ -62,7 +62,7 @@ static bool qp_ellipse_helper_impl(painter_device_t device, uint16_t centerx, ui
bool qp_ellipse(painter_device_t device, uint16_t x, uint16_t y, uint16_t sizex, uint16_t sizey, uint8_t hue, uint8_t sat, uint8_t val, bool filled) {
qp_dprintf("qp_ellipse: entry\n");
painter_driver_t *driver = (painter_driver_t *)device;
if (!driver->validate_ok) {
if (!driver || !driver->validate_ok) {
qp_dprintf("qp_ellipse: fail (validation_ok == false)\n");
return false;
}