Fix debug assertion when no master is present

If no master is present, the debug assertion would dereference a NULL
pointer.
This commit is contained in:
Markus Mäkelä 2018-02-07 17:56:15 +02:00
parent 2a987716a8
commit ed28d986e9
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19

View File

@ -2372,7 +2372,7 @@ monitorMain(void *arg)
}
}
ss_dassert(handle->master == root_master);
ss_dassert(root_master == NULL || handle->master == root_master);
ss_dassert(!root_master ||
((root_master->server->status & (SERVER_SLAVE | SERVER_MASTER))
!= (SERVER_SLAVE | SERVER_MASTER)));