mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-04-22 20:25:39 +02:00
bar/wayland: make sure we don't strcmp() a NULL pointer
This commit is contained in:
parent
e38f593acd
commit
aa1b3457a1
1 changed files with 3 additions and 1 deletions
|
@ -447,7 +447,9 @@ xdg_output_handle_done(void *data, struct zxdg_output_v1 *xdg_output)
|
||||||
struct wayland_backend *backend = mon->backend;
|
struct wayland_backend *backend = mon->backend;
|
||||||
struct private *bar = backend->bar->private;
|
struct private *bar = backend->bar->private;
|
||||||
|
|
||||||
if (bar->monitor != NULL && strcmp(bar->monitor, mon->name) == 0) {
|
if (bar->monitor != NULL && mon->name != NULL &&
|
||||||
|
strcmp(bar->monitor, mon->name) == 0)
|
||||||
|
{
|
||||||
/* User specified a monitor, and this is one */
|
/* User specified a monitor, and this is one */
|
||||||
backend->monitor = mon;
|
backend->monitor = mon;
|
||||||
backend->scale = mon->scale;
|
backend->scale = mon->scale;
|
||||||
|
|
Loading…
Add table
Reference in a new issue