diff --git a/sc2/ChangeLog b/sc2/ChangeLog index 52d8aa10e..e5e330365 100644 --- a/sc2/ChangeLog +++ b/sc2/ChangeLog @@ -1,4 +1,6 @@ Changes towards version 0.4: +- Fixed crash in conversation summary and ffw/frew problem when + selling data to Melnorme (bug #476), from chmmravatar - Flush input after selecting "Navigate" (bug #475) - Michael - Fixed ships in solar system getting displaced after having visited a planet (bug #365) -Alex diff --git a/sc2/src/sc2code/comm.c b/sc2/src/sc2code/comm.c index f0a8089d1..bf1b6b0fb 100644 --- a/sc2/src/sc2code/comm.c +++ b/sc2/src/sc2code/comm.c @@ -1704,6 +1704,8 @@ DoCommunication (PENCOUNTER_STATE pES) for (curr = first_chain; curr != NULL; curr = curr->next) { temp = curr->tag.data; + if (temp == NULL) + break; // fprintf (stderr, "%s\n", temp); while (wstrlen (temp) > (unsigned int) SUMMARY_CHARS && !(GLOBAL (CurrentActivity) & CHECK_ABORT)) diff --git a/sc2/src/sc2code/libs/sound/sound.c b/sc2/src/sc2code/libs/sound/sound.c index ba2266c74..52a8e2a6b 100644 --- a/sc2/src/sc2code/libs/sound/sound.c +++ b/sc2/src/sc2code/libs/sound/sound.c @@ -152,7 +152,7 @@ get_previous_chain (TFB_SoundChain *first_chain, TFB_SoundChain *current_chain) return (prev_chain); while (prev_chain->next) { - if (prev_chain->next == current_chain) + if (prev_chain->next == current_chain || !prev_chain->next->tag.data) return (prev_chain); prev_chain = prev_chain->next; } diff --git a/sc2/src/sc2code/libs/sound/trackplayer.c b/sc2/src/sc2code/libs/sound/trackplayer.c index fa3792da5..b2183e240 100644 --- a/sc2/src/sc2code/libs/sound/trackplayer.c +++ b/sc2/src/sc2code/libs/sound/trackplayer.c @@ -669,7 +669,7 @@ FastForward_Page () { TFB_SoundChain *cur_ptr = sound_sample->play_chain_ptr; LockMutex (soundSource[SPEECH_SOURCE].stream_mutex); - while (cur_ptr->next && ! cur_ptr->tag.type) + while (cur_ptr->next && ! cur_ptr->next->tag.type) cur_ptr = cur_ptr->next; if (cur_ptr->next) {