Commit fd1659dd authored by Morten Welinder's avatar Morten Welinder

Clipboard: guard against unexpected NULL from gtk+.

parent f1dc6af0
2014-11-09 Morten Welinder <terra@gnome.org>
* src/gui-clipboard.c (text_to_cell_region): Guard against NULL
data. Might fix Redhat #1160975.
2014-10-28 Morten Welinder <terra@gnome.org>
* src/style.c (find_font): Accept NULL font name.
......
......@@ -9,6 +9,7 @@ Jean:
Morten:
* Plug leaks.
* Pay more attention to union access rules.
* Attempt a fix for clipboard crash. [Redhat #1160975]
Thomas Kluyver:
* Fix import of extended floats from wk4 files. [#739697]
......
......@@ -131,6 +131,17 @@ text_to_cell_region (WBCGtk *wbcg,
gboolean oneline;
char *data_converted = NULL;
if (!data) {
/*
* See Redhat #1160975.
*
* I'm unsure why someone get NULL here, but this is better
* than a crash.
*/
data = "";
data_len = 0;
}
oneline = text_is_single_cell (data, data_len);
if (oneline && (opt_encoding == NULL || strcmp (opt_encoding, "UTF-8") != 0)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment