summaryrefslogtreecommitdiff
path: root/tools.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools.c')
-rw-r--r--tools.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools.c b/tools.c
index 3a3a1143..03b4c43d 100644
--- a/tools.c
+++ b/tools.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: tools.c 4.13 2020/11/22 13:32:05 kls Exp $
+ * $Id: tools.c 4.13.1.1 2021/01/02 15:05:48 kls Exp $
*/
#include "tools.h"
@@ -151,6 +151,8 @@ char *strreplace(char *s, char c1, char c2)
char *strreplace(char *s, const char *s1, const char *s2)
{
+ if (!s || !s1 || !s2)
+ return s;
char *p = strstr(s, s1);
if (p) {
int of = p - s;