fix(Custom): pclose if continuous script end

This commit is contained in:
Alexis 2018-09-18 23:21:08 +02:00
parent 00959c7d65
commit 0e8b3f71b8
No known key found for this signature in database
GPG Key ID: 20B1EC2EBBA96BD9

View File

@ -46,6 +46,7 @@ void waybar::modules::Custom::continuousWorker()
char* buff = nullptr; char* buff = nullptr;
size_t len = 0; size_t len = 0;
if (getline(&buff, &len, fp) == -1) { if (getline(&buff, &len, fp) == -1) {
pclose(fp);
thread_.stop(); thread_.stop();
output_ = { 1, "" }; output_ = { 1, "" };
dp.emit(); dp.emit();