diff --git a/minmea.c b/minmea.c index 98bc215..a77dc2c 100644 --- a/minmea.c +++ b/minmea.c @@ -93,6 +93,10 @@ bool minmea_scan(const char *sentence, const char *format, ...) { bool result = false; bool optional = false; + + if (sentence == NULL) + return false; + va_list ap; va_start(ap, format);