Index: /issm/trunk/src/c/objects/Params/IntVecParam.cpp
===================================================================
--- /issm/trunk/src/c/objects/Params/IntVecParam.cpp	(revision 9110)
+++ /issm/trunk/src/c/objects/Params/IntVecParam.cpp	(revision 9111)
@@ -32,6 +32,9 @@
 	M=in_M;
 
-	values=(int*)xmalloc(M*sizeof(int));
-	memcpy(values,in_values,M*sizeof(int));
+	if(M){
+		values=(int*)xmalloc(M*sizeof(int));
+		memcpy(values,in_values,M*sizeof(int));
+	}
+	else values=NULL;
 }
 /*}}}*/
@@ -42,6 +45,9 @@
 	M=in_M;
 
-	values=(int*)xmalloc(M*sizeof(int));
-	for(int i=0;i<in_M;i++) values[i]=(int)in_values[i];
+	if(M){
+		values=(int*)xmalloc(M*sizeof(int));
+		for(int i=0;i<in_M;i++) values[i]=(int)in_values[i];
+	}
+	else values=NULL;
 }
 /*}}}*/
@@ -103,5 +109,5 @@
 	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
 	memcpy(marshalled_dataset,&M,sizeof(M));marshalled_dataset+=sizeof(M);
-	memcpy(marshalled_dataset,values,M*sizeof(int));marshalled_dataset+=M*sizeof(int);
+	if(M)memcpy(marshalled_dataset,values,M*sizeof(int));marshalled_dataset+=M*sizeof(int);
 
 	*pmarshalled_dataset=marshalled_dataset;
@@ -132,6 +138,8 @@
 	/*data: */
 	memcpy(&M,marshalled_dataset,sizeof(M));marshalled_dataset+=sizeof(M);
-	values=(int*)xmalloc(M*sizeof(int));
-	memcpy(values,marshalled_dataset,M*sizeof(int));marshalled_dataset+=M*sizeof(int);
+	if(M) {
+		values=(int*)xmalloc(M*sizeof(int));
+		memcpy(values,marshalled_dataset,M*sizeof(int));marshalled_dataset+=M*sizeof(int);
+	}
 
 	/*return: */
@@ -160,6 +168,8 @@
 	int* output=NULL;
 
-	output=(int*)xmalloc(M*sizeof(int));
-	memcpy(output,values,M*sizeof(int));
+	if(M){
+		output=(int*)xmalloc(M*sizeof(int));
+		memcpy(output,values,M*sizeof(int));
+	}
 
 	/*Assign output pointers:*/
@@ -186,6 +196,9 @@
 
 	/*cast intvec into doublevec for Matlab*/
-	doublevec=(double*)xmalloc(M*sizeof(double));
-	for(int i=0;i<M;i++)doublevec[i]=(double)intvec[i];
+	if(M){
+		doublevec=(double*)xmalloc(M*sizeof(double));
+		for(int i=0;i<M;i++)doublevec[i]=(double)intvec[i];
+	}
+	else doublevec=NULL;
 	xfree((void**)&intvec);
 				
@@ -205,6 +218,9 @@
 	xfree((void**)&this->values);
 
-	this->values=(int*)xmalloc(in_M*sizeof(int));
-	memcpy(this->values,intarray,in_M*sizeof(int));
+	if(in_M){
+		this->values=(int*)xmalloc(in_M*sizeof(int));
+		memcpy(this->values,intarray,in_M*sizeof(int));
+	}
+	else this->values=NULL;
 
 	this->M=in_M;
Index: /issm/trunk/src/m/model/ismodelselfconsistent.m
===================================================================
--- /issm/trunk/src/m/model/ismodelselfconsistent.m	(revision 9110)
+++ /issm/trunk/src/m/model/ismodelselfconsistent.m	(revision 9111)
@@ -101,6 +101,8 @@
 fields={'diagnostic_ref'};
 checksize(md,fields,[md.numberofnodes 6]);
-if(size(md.requested_outputs,2)~=1),
-	message(['model ' md.name ' requested outputs should be a column vector']);
+if ~isempty(md.requested_outputs),
+	if(size(md.requested_outputs,2)~=1),
+		message(['model ' md.name ' requested outputs should be a column vector']);
+	end
 end
 %}}}
