From: <mrj...@us...> - 2008-04-19 17:03:52
|
Revision: 2716 http://tora.svn.sourceforge.net/tora/?rev=2716&view=rev Author: mrjohnson0 Date: 2008-04-19 10:03:24 -0700 (Sat, 19 Apr 2008) Log Message: ----------- if not running just return, avoids dynamic_cast that can crash during shutdown Modified Paths: -------------- trunk/tora/src/tooracleconnection.cpp Modified: trunk/tora/src/tooracleconnection.cpp =================================================================== --- trunk/tora/src/tooracleconnection.cpp 2008-04-19 16:45:54 UTC (rev 2715) +++ trunk/tora/src/tooracleconnection.cpp 2008-04-19 17:03:24 UTC (rev 2716) @@ -1159,16 +1159,15 @@ void toOracleProvider::oracleQuery::cancel(void) { + if(!Running) + return; + oracleSub *conn = dynamic_cast<oracleSub *>(query()->connectionSub()); if (!conn) throw QString::fromLatin1("Internal error, not oracle sub connection"); - if (Running) - { - conn->Connection->cancel(); - Cancel = true; - } - else - Cancel = true; + + conn->Connection->cancel(); + Cancel = true; } toConnectionSub *toOracleProvider::oracleConnection::createConnection(void) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |