From f498d80c587033bffb9abedb2b0827ad8d4a2a32 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 2 Feb 2012 05:11:50 +0300 Subject: Add some checks after automatic checking. --- src/utils/stringutils.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/utils/stringutils.cpp') diff --git a/src/utils/stringutils.cpp b/src/utils/stringutils.cpp index 26accbc7d..a5c0c471b 100644 --- a/src/utils/stringutils.cpp +++ b/src/utils/stringutils.cpp @@ -554,6 +554,9 @@ std::string stringToHexPath(const std::string &str) void deleteCharLeft(std::string &str, unsigned *pos) { + if (!pos) + return; + while (*pos > 0) { (*pos)--; -- cgit v1.2.3-60-g2f50