svn: 3386
@@ -1162,7 +1162,7 @@ write_tmp_userfile(char *fn, const struct userrec *bu, int idx)
/* FIXME: REMOVE AFTER 1.2.14 */
bool old = 0;
- tand_t* bot = findbot(dcc[idx].nick);
+ tand_t* bot = idx != -1 ? findbot(dcc[idx].nick) : NULL;
if (bot && bot->buildts < 1175102242) /* flood-* hacks */
old = 1;
@@ -480,7 +480,7 @@ int write_userfile(int idx)
channels_writeuserfile(old);