mirror of
https://gitlab.freedesktop.org/plymouth/plymouth.git
synced 2026-05-06 17:18:00 +02:00
Merge branch 'fix-label-crasher' into 'main'
ply-label: Make NULL safe (again) See merge request plymouth/plymouth!270
This commit is contained in:
commit
1a8e184885
1 changed files with 5 additions and 2 deletions
|
|
@ -248,7 +248,10 @@ ply_label_set_text (ply_label_t *label,
|
|||
const char *text)
|
||||
{
|
||||
free (label->text);
|
||||
label->text = strdup (text);
|
||||
label->text = NULL;
|
||||
|
||||
if (text != NULL)
|
||||
label->text = strdup (text);
|
||||
|
||||
if (label->rich_text) {
|
||||
ply_rich_text_drop_reference (label->rich_text);
|
||||
|
|
@ -259,7 +262,7 @@ ply_label_set_text (ply_label_t *label,
|
|||
return;
|
||||
|
||||
label->plugin_interface->set_text_for_control (label->control,
|
||||
text?: "");
|
||||
label->text?: "");
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue