Index: /issm/trunk-jpl/src/c/toolkits/issm/IssmDenseMat.h
===================================================================
--- /issm/trunk-jpl/src/c/toolkits/issm/IssmDenseMat.h	(revision 14864)
+++ /issm/trunk-jpl/src/c/toolkits/issm/IssmDenseMat.h	(revision 14865)
@@ -255,10 +255,13 @@
 
 			/*First off, we assume that the type of IssmAbsVec is IssmSeqVec. So downcast: */
-			IssmSeqVec<IssmDouble>* pf=(IssmSeqVec<IssmDouble>*)pfin;
+			IssmSeqVec<IssmDouble>* pf = NULL;
+			IssmSeqVec<IssmDouble> *uf = NULL;
 
 			#ifdef _HAVE_GSL_
+				/*Assume we are getting an IssmSeqVecVec in input, downcast: */
+				pf=(IssmSeqVec<IssmDouble>*)pfin;
+
 				/*Intermediary: */
 				int N2;
-				IssmSeqVec<IssmDouble> *uf = NULL;
 
 				pf->GetSize(&N2);
@@ -266,20 +269,22 @@
 				if(N!=N2)_error_("Right hand side vector of size " << N2 << ", when matrix is of size " << M << "-" << N << " !");
 				if(M!=N)_error_("Stiffness matrix should be square!");
+				
 				#ifdef _HAVE_ADOLC_
 					ensureContiguousLocations(N);
 				#endif
 				IssmDouble *x  = xNew<IssmDouble>(N);
+
 				#ifdef _HAVE_ADOLC_
 					SolverxSeq(x,Kff->matrix,pf->vector,N,parameters);
-				#els
+				#else
 					SolverxSeq(x,Kff->matrix,pf->vector,N);
 				#endif
 
 				uf=new IssmSeqVec<IssmDouble>(x,N);
+
 				xDelete(x);
 
 				/*return: */
 				return uf;
-
 			#else
 				_error_("GSL support not compiled in!");
