From 338251b64b9952a5db45fbe2a196811c570b6cc7 Mon Sep 17 00:00:00 2001 From: Andrea Zagli Date: Fri, 28 Jun 2013 12:56:42 +0200 Subject: [PATCH] Adjustment. --- src/gdaex.c | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/src/gdaex.c b/src/gdaex.c index 0478853..60d5a1e 100644 --- a/src/gdaex.c +++ b/src/gdaex.c @@ -3193,23 +3193,25 @@ const gchar error = NULL; stmt = gda_sql_builder_get_statement (b, &error); - if (error != NULL || stmt == NULL) + if (stmt == NULL || error != NULL) { g_warning (_("Unable to get a GdaStatement from GdaSqlBuilder: %s"), - error->message != NULL ? error->message : _("no details")); + error != NULL && error->message != NULL ? error->message : _("no details")); } - - error = NULL; - ret = gda_statement_to_sql_extended (stmt, - priv->gda_conn, - NULL, - 0, - NULL, - &error); - if (error != NULL) + else { - g_warning (_("Unable to get an SQL statement from GdaStatement: %s"), - error->message != NULL ? error->message : _("no details")); + error = NULL; + ret = gda_statement_to_sql_extended (stmt, + priv->gda_conn, + NULL, + 0, + NULL, + &error); + if (ret == NULL || error != NULL) + { + g_warning (_("Unable to get an SQL statement from GdaStatement: %s"), + error != NULL && error->message != NULL ? error->message : _("no details")); + } } if (b != NULL) -- 2.49.0