diff --git a/src/helpers/MiscFunctions.cpp b/src/helpers/MiscFunctions.cpp index c825a1d9..bf20f390 100644 --- a/src/helpers/MiscFunctions.cpp +++ b/src/helpers/MiscFunctions.cpp @@ -145,6 +145,9 @@ void scaleBox(wlr_box* box, float scale) { } std::string removeBeginEndSpacesTabs(std::string str) { + if (str.empty()) + return str; + int countBefore = 0; while (str[countBefore] == ' ' || str[countBefore] == '\t') { countBefore++;