Skip to content

Instantly share code, notes, and snippets.

@aaronjensen
Created September 27, 2018 03:42
Show Gist options
  • Save aaronjensen/1f3694bf98a5c6e1578389462a56d7c3 to your computer and use it in GitHub Desktop.
Save aaronjensen/1f3694bf98a5c6e1578389462a56d7c3 to your computer and use it in GitHub Desktop.
---
I believe this should fix the colour list error.
src/nsterm.m | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/src/nsterm.m b/src/nsterm.m
index 954020dcde..d92d6c3244 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -5193,7 +5193,21 @@ Needs to be here because ns_initialize_display_info ()
uses AppKit classes.
alpha: 1.0]
forKey: [NSString stringWithUTF8String: name]];
}
- [cl writeToFile: nil];
+
+ /* FIXME: Report any errors writing the color file below. */
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101100
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 101100
+ if ([cl respondsToSelector:@selector(writeToURL:error:)])
+#endif
+ [cl writeToURL:nil error:nil];
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 101100
+ else
+#endif
+#endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= 101100 */
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 101100 \
+ || defined (NS_IMPL_GNUSTEP)
+ [cl writeToFile: nil];
+#endif
}
}
--
2.18.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment