diff options
author | Benjamin Otte <otte@redhat.com> | 2011-11-22 23:27:40 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2011-11-22 23:29:04 +0100 |
commit | 6a6af8464be090c23ecee6d6a62c188117da36e1 (patch) | |
tree | 93c45ef0e6af79c345ed6b27005afe9c73eb6ea8 /demos | |
parent | 6d0499a5002a46600cfe95a7feb4d69d4f6dfb51 (diff) | |
download | gtk+-6a6af8464be090c23ecee6d6a62c188117da36e1.tar.gz |
gtk-demo: Fix segfault in editable cells demo
The strings can be freed when edting the description column. This does
not work with constant strings.
Diffstat (limited to 'demos')
-rw-r--r-- | demos/gtk-demo/editable_cells.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/demos/gtk-demo/editable_cells.c b/demos/gtk-demo/editable_cells.c index da19b19ea6..debdb8e235 100644 --- a/demos/gtk-demo/editable_cells.c +++ b/demos/gtk-demo/editable_cells.c @@ -48,27 +48,27 @@ add_items (void) g_return_if_fail (articles != NULL); foo.number = 3; - foo.product = "bottles of coke"; + foo.product = g_strdup ("bottles of coke"); foo.yummy = 20; g_array_append_vals (articles, &foo, 1); foo.number = 5; - foo.product = "packages of noodles"; + foo.product = g_strdup ("packages of noodles"); foo.yummy = 50; g_array_append_vals (articles, &foo, 1); foo.number = 2; - foo.product = "packages of chocolate chip cookies"; + foo.product = g_strdup ("packages of chocolate chip cookies"); foo.yummy = 90; g_array_append_vals (articles, &foo, 1); foo.number = 1; - foo.product = "can vanilla ice cream"; + foo.product = g_strdup ("can vanilla ice cream"); foo.yummy = 60; g_array_append_vals (articles, &foo, 1); foo.number = 6; - foo.product = "eggs"; + foo.product = g_strdup ("eggs"); foo.yummy = 10; g_array_append_vals (articles, &foo, 1); } |