@@ -161,7 +161,7 @@ void putlog(int type, const char *chname, const char *format, ...)
int idx = 0;
char out[LOGLINEMAX + 1] = "";
- if (conf.bot->hub) {
+ if (conf.bot && conf.bot->hub) {
char stamp[34] = "";
struct tm *t = gmtime(&now);
@@ -148,7 +148,7 @@ static char *getfullbinname(const char *argv_zero)
void fatal(const char *s, int recoverable)
{
- if (conf && !conf.bot->hub)
+ if (conf.bot && !conf.bot->hub)
nuke_server((char *) s);
if (s && s[0])
@@ -173,8 +173,10 @@ Tempfile::Tempfile(const char *prefix)
void Tempfile::MakeTemp()
- if ((fd = mkstemp(file)) < 0)
+ if ((fd = mkstemp(file)) < 0) {
+ f = NULL;
goto error;
+ }
if ((f = fdopen(fd, "w+b")) == NULL)