diff --git a/SStream.c b/SStream.c
index 90cef53..7ee9fd9 100644
--- a/SStream.c
+++ b/SStream.c
@@ -31,6 +31,9 @@ void SStream_Init(SStream *ss)
 void SStream_concat0(SStream *ss, const char *s)
 {
 #ifndef CAPSTONE_DIET
+	if (!ss || !s) {
+		return;
+	}
 	unsigned int len = (unsigned int) strlen(s);
 
 	memcpy(ss->buffer + ss->index, s, len);
