mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Merge pull request #1653 from MarcoPolo-PasTonMolo/fix/editor-crash
Fix crash on /editor
This commit is contained in:
commit
39b276986b
@ -71,7 +71,11 @@ get_message_from_editor(gchar* message, gchar** returned_message)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gsize messagelen = strlen(message);
|
||||
gsize messagelen = 0;
|
||||
if (message != NULL) {
|
||||
messagelen = strlen(message);
|
||||
}
|
||||
|
||||
if (!g_file_set_contents(filename, message, messagelen, &glib_error)) {
|
||||
log_error("[Editor] could not write to %s: %s", filename, glib_error ? glib_error->message : "No GLib error given");
|
||||
if (glib_error) {
|
||||
|
Loading…
Reference in New Issue
Block a user