Skip to content

Commit b91410a

Browse files
committed
background: handle wordexp failure
Sometimes (for example with the default value), wordexp fails and we should simply catch this case. Fixes #47
1 parent fda1747 commit b91410a

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/background/background.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,9 @@ bool WayfireBackground::load_images_from_dir(std::string path)
110110

111111
/* Expand path */
112112
wordexp(path.c_str(), &exp, 0);
113+
if (!exp.we_wordv)
114+
return false;
115+
113116
auto dir = opendir(exp.we_wordv[0]);
114117
if (!dir)
115118
return false;

0 commit comments

Comments
 (0)