fix mem corruption

This commit is contained in:
Isaac Connor 2017-12-03 12:50:57 -05:00
parent 9d5447aa6a
commit c04ec1b8a8
1 changed files with 3 additions and 2 deletions

View File

@ -28,8 +28,9 @@ MYSQL dbconn;
int zmDbConnected = false; int zmDbConnected = false;
void zmDbConnect() { void zmDbConnect() {
if ( zmDbConnected ) // For some reason having these lines causes memory corruption and crashing on newer debian/ubuntu
return; //if ( zmDbConnected )
//return;
if ( !mysql_init( &dbconn ) ) { if ( !mysql_init( &dbconn ) ) {
Error( "Can't initialise database connection: %s", mysql_error( &dbconn ) ); Error( "Can't initialise database connection: %s", mysql_error( &dbconn ) );