Package: qgis / 2.4.0-1

0001-oracle-provider-fix-closing-of-iterator-in-case-of-e.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
From 87e4b074c720eeef31985e6d1b570771b5d82ebc Mon Sep 17 00:00:00 2001
From: "Juergen E. Fischer" <jef@norbit.de>
Date: Sun, 29 Jun 2014 13:10:34 +0200
Subject: oracle provider: fix closing of iterator in case of error
Origin: https://github.com/qgis/QGIS/commit/87e4b074c720eeef31985e6d1b570771b5d82ebc

---
 src/providers/oracle/qgsoraclefeatureiterator.cpp |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

--- a/src/providers/oracle/qgsoraclefeatureiterator.cpp
+++ b/src/providers/oracle/qgsoraclefeatureiterator.cpp
@@ -107,8 +107,7 @@ QgsOracleFeatureIterator::QgsOracleFeatu
     whereClause += "(" + mSource->mSqlWhereClause + ")";
   }
 
-  if ( !openQuery( whereClause ) )
-    return;
+  openQuery( whereClause );
 }
 
 QgsOracleFeatureIterator::~QgsOracleFeatureIterator()
@@ -252,10 +251,8 @@ bool QgsOracleFeatureIterator::rewind()
 
 bool QgsOracleFeatureIterator::close()
 {
-  if ( !mQry.isActive() )
-    return false;
-
-  mQry.finish();
+  if ( mQry.isActive() )
+    mQry.finish();
 
   if ( mConnection )
     mConnection->disconnect();