gcompris r3628 - trunk/src/boards
- From: bcoudoin svn gnome org
- To: svn-commits-list gnome org
- Subject: gcompris r3628 - trunk/src/boards
- Date: Tue, 25 Nov 2008 00:04:59 +0000 (UTC)
Author: bcoudoin
Date: Tue Nov 25 00:04:59 2008
New Revision: 3628
URL: http://svn.gnome.org/viewvc/gcompris?rev=3628&view=rev
Log:
* 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.
Modified:
trunk/src/boards/shapegame.c
Modified: trunk/src/boards/shapegame.c
==============================================================================
--- trunk/src/boards/shapegame.c (original)
+++ trunk/src/boards/shapegame.c Tue Nov 25 00:04:59 2008
@@ -949,16 +949,20 @@
* 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]