mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-01 18:00:26 +00:00
Add warning to ButtonSet::addItem() which is not safe to use w/a non-string literal
This commit is contained in:
parent
d88eb80fe6
commit
672f371622
@ -239,6 +239,9 @@ ButtonSet::Item* ButtonSet::addItem(Item* item, const char* styleId)
|
||||
|
||||
ButtonSet::Item* ButtonSet::addItem(Item* item, int hspan, int vspan, const char* styleId)
|
||||
{
|
||||
// TODO warning, here we're saving a copy of the styleId pointer,
|
||||
// which if it's not a literal that lives enough for this
|
||||
// lambda, it will crash the program
|
||||
item->InitTheme.connect(
|
||||
[item, styleId] {
|
||||
ui::Style* style;
|
||||
|
Loading…
Reference in New Issue
Block a user