Merge lp:~oopsdude/stellarium/stellarium into lp:stellarium
Status: | Merged |
---|---|
Merged at revision: | 5705 |
Proposed branch: | lp:~oopsdude/stellarium/stellarium |
Merge into: | lp:stellarium |
Diff against target: |
58 lines (+19/-13) 2 files modified
plugins/TextUserInterface/src/TuiNodeEnum.cpp (+17/-12) plugins/TextUserInterface/src/TuiNodeEnum.hpp (+2/-1) |
To merge this branch: | bzr merge lp:~oopsdude/stellarium/stellarium |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Alexander Wolf | Approve | ||
Review via email: mp+136074@code.launchpad.net |
Description of the change
These commits fix a crash in the TUI plugin that happened when the user tried to display a TuiNodeEnum that had been created with an empty list of elements.
To reproduce it, rename your "locale" directory to something else. Then activate the TUI plugin, press "m", and navigate to "3. General -> 3.2. Language: XXX". Stellarium should crash with a SIGABRT triggered at TuiNodeEnum.cpp:71, since the stringList field is empty. I only noticed this because my dev build doesn't have a "locale" directory.
Anyway, this patch detects when the list of elements is empty, and displays the default value instead. Maybe it should display something like "(none)" instead; it's up to you.
Best,
Mike