artemsen / swayimg

Image viewer for Wayland
MIT License
380 stars 31 forks source link

Fails to start without flags #198

Closed jbeich closed 1 month ago

jbeich commented 1 month ago

Regressed by 2f4006dc3ddf. When config file doesn't exist yet swayimg constructs a synthetic one from command line flags but when no flags are specified the config remains uninitialized (NULL) which aborts (EXIT_FAILURE) runtime.

https://github.com/artemsen/swayimg/blob/4e763a46e103e8c37e844337b93251ad37ad7103/src/main.c#L153

$ swayimg /path/to/foo.jpg; echo $?
1
$ swayimg -a test /path/to/foo.jpg; echo $?
<image>
0
artemsen commented 1 month ago

Fixed. Thank you!