diff options
author | Bruno Coudoin <bcoudoin@src.gnome.org> | 2008-11-25 00:04:59 (GMT) |
---|---|---|
committer | Bruno Coudoin <bcoudoin@src.gnome.org> | 2008-11-25 00:04:59 (GMT) |
commit | 33fc6198a8ae248f3411f79d86cc9e73a53b42de (patch) | |
tree | 4b3ccb593339ee02f9188732867f8c668d8ec358 /src/boards | |
parent | dd2240028d74d445a4e3b1f248ebf140d836b3bd (diff) |
Fixed a crash in case of multiple sound list. This was especially the case
* src/boards/shapegame.c: (item_event_drag): Fixed a crash in case of multiple sound list.
This was especially the case in the level 3 of the double entry activity.
svn path=/trunk/; revision=3628
Diffstat (limited to 'src/boards')
-rw-r--r-- | src/boards/shapegame.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/boards/shapegame.c b/src/boards/shapegame.c index d5c9d11..e21492d 100644 --- a/src/boards/shapegame.c +++ b/src/boards/shapegame.c @@ -949,16 +949,20 @@ static gint item_event_drag(GnomeCanvasItem *item, GdkEvent *event, gpointer dat * of sound rather than a single one */ char *p = NULL; char *soundfile = g_strdup(shape->soundfile); + char *soundfiles = soundfile; - while ((p = strstr (soundfile, " "))) + while ((p = strstr (soundfiles, " "))) { *p='\0'; - gc_sound_play_ogg(soundfile, NULL); - soundfile=p+1; - g_warning("soundfile = %s\n", soundfile); + gc_sound_play_ogg(soundfiles, NULL); + soundfiles= p + 1; + g_warning("soundfile = %s\n", soundfiles); } - gc_sound_play_ogg(soundfile, NULL); + if (soundfiles != soundfile) + gc_sound_play_ogg(soundfiles, NULL); + else + gc_sound_play_ogg(soundfile, NULL); g_free(soundfile); } else |