mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-04-23 20:35:42 +02:00
commit
804af178d5
4 changed files with 13 additions and 3 deletions
|
@ -25,6 +25,9 @@
|
|||
|
||||
* `left-margin` and `right-margin` from being rejected as invalid
|
||||
options.
|
||||
* Crash when `udev_monitor_receive_device()` returned `NULL`. This
|
||||
affected the “backlight”, “battery” and “removables” modules
|
||||
(https://codeberg.org/dnkl/yambar/issues/109).
|
||||
|
||||
|
||||
### Security
|
||||
|
|
|
@ -189,9 +189,11 @@ run(struct module *mod)
|
|||
break;
|
||||
|
||||
struct udev_device *dev = udev_monitor_receive_device(mon);
|
||||
const char *sysname = udev_device_get_sysname(dev);
|
||||
if (dev == NULL)
|
||||
continue;
|
||||
|
||||
bool is_us = strcmp(sysname, m->device) == 0;
|
||||
const char *sysname = udev_device_get_sysname(dev);
|
||||
bool is_us = sysname != NULL && strcmp(sysname, m->device) == 0;
|
||||
udev_device_unref(dev);
|
||||
|
||||
if (!is_us)
|
||||
|
|
|
@ -437,8 +437,10 @@ run(struct module *mod)
|
|||
|
||||
if (fds[1].revents & POLLIN) {
|
||||
struct udev_device *dev = udev_monitor_receive_device(mon);
|
||||
const char *sysname = udev_device_get_sysname(dev);
|
||||
if (dev == NULL)
|
||||
continue;
|
||||
|
||||
const char *sysname = udev_device_get_sysname(dev);
|
||||
bool is_us = sysname != NULL && strcmp(sysname, m->battery) == 0;
|
||||
udev_device_unref(dev);
|
||||
|
||||
|
|
|
@ -571,6 +571,9 @@ run(struct module *mod)
|
|||
|
||||
if (fds[1].revents & POLLIN) {
|
||||
struct udev_device *dev = udev_monitor_receive_device(dev_mon);
|
||||
if (dev == NULL)
|
||||
continue;
|
||||
|
||||
if (handle_udev_event(mod, dev))
|
||||
update = true;
|
||||
udev_device_unref(dev);
|
||||
|
|
Loading…
Add table
Reference in a new issue