diff options
-rw-r--r-- | mg_db_gd_mysql.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mg_db_gd_mysql.c b/mg_db_gd_mysql.c index 15c8d3b..75fe7fb 100644 --- a/mg_db_gd_mysql.c +++ b/mg_db_gd_mysql.c @@ -42,7 +42,7 @@ mgSQLStringMySQL::unquoted() const int buflen=2*strlen(m_original)+3; m_unquoted = (char *) malloc( buflen); mgDb* esc = DbServer->EscapeDb(); - if (esc) + if (esc && esc->DbHandle()) mysql_real_escape_string( (MYSQL*)esc->DbHandle(), m_unquoted, m_original, strlen(m_original) ); else |