Commit cbaea1a1 authored by Victor Ananjevsky's avatar Victor Ananjevsky

fix segfault when opening zero-length file in text-info dialog

parent d24e98cc
......@@ -375,6 +375,9 @@ fill_buffer_from_file ()
return;
}
if (len <= 0)
return;
gtk_text_buffer_get_iter_at_offset (GTK_TEXT_BUFFER (text_buffer), &iter, 0);
if (!g_utf8_validate (buf, -1, NULL))
......
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