aboutsummaryrefslogtreecommitdiff
path: root/lib/utils_base.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/utils_base.c')
-rw-r--r--lib/utils_base.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/utils_base.c b/lib/utils_base.c
index 3822bcf1..19a531f5 100644
--- a/lib/utils_base.c
+++ b/lib/utils_base.c
@@ -87,10 +87,13 @@ void _get_monitoring_plugin( monitoring_plugin **pointer ){
void
die (int result, const char *fmt, ...)
{
- va_list ap;
- va_start (ap, fmt);
- vprintf (fmt, ap);
- va_end (ap);
+ if(fmt!=NULL) {
+ va_list ap;
+ va_start (ap, fmt);
+ vprintf (fmt, ap);
+ va_end (ap);
+ }
+
if(this_monitoring_plugin!=NULL) {
np_cleanup();
}