changeset 1554:83249ce59d13

minor fix
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 06 Oct 2020 19:36:57 -0600
parents 26c51acf00f3
children 1b397a949791
files src/luan/modules/parsers/LuanToString.java
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
diff -r 26c51acf00f3 -r 83249ce59d13 src/luan/modules/parsers/LuanToString.java
--- a/src/luan/modules/parsers/LuanToString.java	Tue Oct 06 19:31:57 2020 -0600
+++ b/src/luan/modules/parsers/LuanToString.java	Tue Oct 06 19:36:57 2020 -0600
@@ -180,10 +180,12 @@
 			sb.append( ']' );
 		}
 		sb.append( settings.compressed ? "=" : " = " );
-		LuanTable options = (LuanTable)subOptions.get(key);
-		if( options != null ) {
-			settings = settings.cloneSettings();
-			settings.applyOptions(options);
+		if( subOptions != null ) {
+			LuanTable options = (LuanTable)subOptions.get(key);
+			if( options != null ) {
+				settings = settings.cloneSettings();
+				settings.applyOptions(options);
+			}
 		}
 		toString( entry.getValue(), sb, indented, settings );
 	}