Skip to content

Commit

Permalink
Fix/warning logs in axoverlay example
Browse files Browse the repository at this point in the history
Fixes #222
  • Loading branch information
johan-olsson-work authored and pataxis committed Apr 9, 2024
1 parent e9f9347 commit f05207b
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions axoverlay/app/axoverlay.c
Original file line number Diff line number Diff line change
Expand Up @@ -429,9 +429,19 @@ int main(int argc, char** argv) {

// Get max resolution for width and height
camera_width = axoverlay_get_max_resolution_width(1, &error);
g_error_free(error);
if (error != NULL) {
syslog(LOG_ERR, "Failed to get max resolution width: %s", error->message);
g_error_free(error);
error = NULL;
}

camera_height = axoverlay_get_max_resolution_height(1, &error);
g_error_free(error);
if (error != NULL) {
syslog(LOG_ERR, "Failed to get max resolution height: %s", error->message);
g_error_free(error);
error = NULL;
}

syslog(LOG_INFO, "Max resolution (width x height): %i x %i", camera_width, camera_height);

// Create a large overlay using Palette color space
Expand Down

0 comments on commit f05207b

Please sign in to comment.