To: vim-dev@vim.org Subject: Patch 5.8.008 Fcc: outbox From: Bram Moolenaar ------------ Patch 5.8.008 Problem: Vim could crash when pasting selected text in another program. Only with the GTK GUI. Solution: Don't free the text list when the count is zero. Files: src/gui_gtk_x11.c *** ../vim-5.8.007/src/gui_gtk_x11.c Mon Jun 4 22:16:15 2001 --- src/gui_gtk_x11.c Fri Jul 20 11:06:52 2001 *************** *** 714,727 **** count = gdk_text_property_to_text_list(data->type, data->format, data->data, data->length, &list); ! len = 0; ! for (i = 0; i < count; i++) ! g_string_append(str, list[i]); p = (char_u *)str->str; len = str->len; g_string_free(str, FALSE); - gdk_free_text_list(list); free_p = TRUE; } else --- 714,729 ---- count = gdk_text_property_to_text_list(data->type, data->format, data->data, data->length, &list); ! if (count > 0) ! { ! for (i = 0; i < count; i++) ! g_string_append(str, list[i]); ! gdk_free_text_list(list); ! } p = (char_u *)str->str; len = str->len; g_string_free(str, FALSE); free_p = TRUE; } else *** ../vim-5.8.007/src/version.c Sat Jun 30 12:32:13 2001 --- src/version.c Sun Jul 22 14:20:30 2001 *************** *** 439,440 **** --- 439,442 ---- { /* Add new patch number below this line */ + /**/ + 8, /**/ -- You can be stopped by the police for biking over 65 miles per hour. You are not allowed to walk across a street on your hands. [real standing laws in Connecticut, United States of America] /// Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net \\\ ((( Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim ))) \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///