Add missing NULL pointer check to monitorRemoveServer

The pointer was falsely assumed to be non-NULL.
This commit is contained in:
Markus Makela 2016-11-16 10:09:38 +02:00
parent c4999232ce
commit 5ecd0af68e

View File

@ -349,7 +349,7 @@ void monitorRemoveServer(MONITOR *mon, SERVER *server)
MONITOR_SERVERS *ptr = mon->databases;
if (ptr->server == server)
if (ptr && ptr->server == server)
{
mon->databases = mon->databases->next;
}