projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
71f9236
)
Fix crash when using get_data() on new, empty choices.
author
Carl Hetherington
<cth@carlh.net>
Tue, 6 May 2025 15:53:09 +0000
(17:53 +0200)
committer
Carl Hetherington
<cth@carlh.net>
Wed, 7 May 2025 23:29:35 +0000
(
01:29
+0200)
Due to the dummy item that we have to add.
src/wx/dcpomatic_choice.cc
patch
|
blob
|
history
diff --git
a/src/wx/dcpomatic_choice.cc
b/src/wx/dcpomatic_choice.cc
index 5b3b9fb48b751ed5865b1ead0891e76604104faa..270ab72ad15d9e33dbf7963906c9f33d22d89bba 100644
(file)
--- a/
src/wx/dcpomatic_choice.cc
+++ b/
src/wx/dcpomatic_choice.cc
@@
-144,6
+144,9
@@
Choice::get() const
optional<string>
Choice::get_data() const
{
+ if (size() == 0) {
+ return {};
+ }
auto index = get();
if (!index) {