Index: /issm/trunk/src/mex/KMLMeshWrite/KMLMeshWrite.cpp
===================================================================
--- /issm/trunk/src/mex/KMLMeshWrite/KMLMeshWrite.cpp	(revision 7737)
+++ /issm/trunk/src/mex/KMLMeshWrite/KMLMeshWrite.cpp	(revision 7738)
@@ -42,5 +42,5 @@
 	FILE*   fid=NULL;
 
-	DataSet* options=NULL;
+	Options* options=NULL;
 
 	/* output: */
@@ -107,8 +107,6 @@
 	if (verbose) printf("  filnam =\"%s\"\n",filnam);
 
-	if (nrhs > NRHS) {
-		if (verbose) printf("Parsing options:\n");
-		options=OptionsParse(NRHS,nrhs,prhs);
-	}
+	if (verbose) printf("Parsing options:\n");
+	options=new Options(NRHS,nrhs,prhs);
 
 	/*some checks*/
@@ -163,11 +161,7 @@
 	WriteData(ERRORFLAG,ierror);
 
-	if (options) {
-		delete options;
-		options=NULL;
-	}
-
-	if (mxIsCell(NOTES) && notes)
-		xfree((void**)&notes);
+	/*Clean-up*/
+	delete options;
+	if (mxIsCell(NOTES) && notes) xfree((void**)&notes);
 
 	/*end module: */
