Skip to content

fix(sdl): check against NULL before using the driver data of a display - #6799

Merged
XuNeo merged 1 commit into
lvgl:masterfrom
Eppendorf-SW:fix/sdl_get_display
Sep 5, 2024
Merged

XuNeo merged 1 commit into
lvgl:masterfrom
Eppendorf-SW:fix/sdl_get_display

Conversation

@Viatorus

@Viatorus Viatorus commented Sep 4, 2024

Copy link
Copy Markdown
Contributor

We are migrating from LVGL 8 to 9.2.

When we simulate our device's GUI, we embed the device GUI as a secondary display (draw-buffer-only) in an SDL display. The SDL display shows some hardware buttons around the device GUI. So it is a display in display.

In LVGL 9, all displays are assumed to be an SDL display. But this isn't the case. The simplest workaround that works for us is to check if the drive data is not null.

It would be even better to check what type of display it is. Unfortunately, I don't see such an option yet.

@kisvegabor kisvegabor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could

  • storing unique IDs for the drivers (or string names): makes sense to me
  • introduce a similar class system that we have for widgets: seems overkill

Anyway, it'd be a larger change. Let's merge it as a hotfix.

@kisvegabor kisvegabor added the 👀 Review needed Anyone can review a PR label Sep 4, 2024
@XuNeo
XuNeo merged commit 91d64b1 into lvgl:master Sep 5, 2024
@Viatorus
Viatorus deleted the fix/sdl_get_display branch September 5, 2024 05:26
kisvegabor pushed a commit to kisvegabor/lvgl_fork that referenced this pull request Oct 1, 2024
rodb70 pushed a commit to rodb70/lvgl that referenced this pull request Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

👀 Review needed Anyone can review a PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants