git.lxde.org
/
lxde
/
lxpanel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5efc0f0
)
[SF#905] plugins/monitors: reset the color if empty
author
Mamoru TASAKA
<mtasaka@fedoraproject.org>
Tue, 13 Feb 2018 15:11:53 +0000
(
00:11
+0900)
committer
Andriy Grytsenko
<andrej@rep.kiev.ua>
Mon, 5 Mar 2018 14:06:56 +0000
(16:06 +0200)
User may remove color value, or when doing copy/paste color value from somewhere,
it seems that color value can once disappear.
In such case, reset to the default to prevent segv
plugins/monitors/monitors.c
patch
|
blob
|
blame
|
history
diff --git
a/plugins/monitors/monitors.c
b/plugins/monitors/monitors.c
index
19b8472
..
75f00c1
100644
(file)
--- a/
plugins/monitors/monitors.c
+++ b/
plugins/monitors/monitors.c
@@
-748,6
+748,10
@@
monitors_apply_config (gpointer user_data)
start:
for (i = 0; i < N_MONITORS; i++)
{
+ /* User may remove color value. In such case, reset to the default */
+ if (!colors[i])
+ colors[i] = g_strndup(default_colors[i], COLOR_SIZE-1);
+
if (mp->displayed_monitors[i])
current_n_monitors++;