Fixed logic that was passing NULL to a std::string parameter and
crashing dumpstate.

BUG: 8420215
Change-Id: If2f3ebad559683b5b6a8c2209de93ac3bec4fb1e
diff --git a/cmds/dumpstate/utils.cpp b/cmds/dumpstate/utils.cpp
index 5115e66..d939779 100644
--- a/cmds/dumpstate/utils.cpp
+++ b/cmds/dumpstate/utils.cpp
@@ -880,7 +880,7 @@
     }
 }
 
-void take_screenshot(std::string path) {
+void take_screenshot(const std::string& path) {
     const char *args[] = { "/system/bin/screencap", "-p", path.c_str(), NULL };
     run_command_always(NULL, 10, args);
 }