diff --git a/cmake-ide.el b/cmake-ide.el index ec2cffb..68a93b7 100644 --- a/cmake-ide.el +++ b/cmake-ide.el @@ -637,10 +637,11 @@ the object file's name just above." (defun cmake-ide--remove-compiler-from-args (str) "Remove the compiler command from STR, leaving only arguments." - (let ((args (split-string str " +"))) - (if (string-suffix-p "ccache" (car args)) - (cddr args) - (cdr args)))) + (when str + (let ((args (split-string str " +"))) + (if (string-suffix-p "ccache" (car args)) + (cddr args) + (cdr args))))) (defun cmake-ide--filter-ac-flags (flags) "Filter unwanted compiler arguments out from FLAGS."