From 68b721d62cab1546cf5a608a9e80a526e81f21a9 Mon Sep 17 00:00:00 2001 From: marcus Date: Mon, 14 Feb 2005 01:23:13 +0000 Subject: Fix some crashers trying to initialize gnome-speech when no voices are present. Reported by: adamw Obtained from: GNOME CVS --- accessibility/dasher/Makefile | 2 +- accessibility/dasher/files/patch-Src_Gtk2_speech.cc | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) (limited to 'accessibility/dasher') diff --git a/accessibility/dasher/Makefile b/accessibility/dasher/Makefile index c3a0f72b82e1..c93d7ee10dfe 100644 --- a/accessibility/dasher/Makefile +++ b/accessibility/dasher/Makefile @@ -7,7 +7,7 @@ PORTNAME= dasher PORTVERSION= 3.2.11 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= accessibility editors x11 gnome MASTER_SITES= ${MASTER_SITE_GNOME} MASTER_SITE_SUBDIR= sources/${PORTNAME}/3.2 diff --git a/accessibility/dasher/files/patch-Src_Gtk2_speech.cc b/accessibility/dasher/files/patch-Src_Gtk2_speech.cc index e3ab155cbb88..93031e47f2c4 100644 --- a/accessibility/dasher/files/patch-Src_Gtk2_speech.cc +++ b/accessibility/dasher/files/patch-Src_Gtk2_speech.cc @@ -1,11 +1,21 @@ ---- Src/Gtk2/speech.cc.orig Fri Nov 12 13:11:45 2004 -+++ Src/Gtk2/speech.cc Fri Nov 12 13:11:59 2004 +--- Src/Gtk2/speech.cc.orig Fri Jul 30 15:28:41 2004 ++++ Src/Gtk2/speech.cc Sun Feb 13 20:15:46 2005 @@ -46,7 +46,7 @@ voices = GNOME_Speech_SynthesisDriver_getAllVoices (rv, &ev); - if (voices==NULL || BONOBO_EX (&ev)) { -+ if (voices==NULL || voices->_buffer==NULL || BONOBO_EX (&ev)) { ++ if (voices==NULL || BONOBO_EX (&ev) || voices->_length==0) { printf(_("Unable to initialize voices")); speaker=NULL; return; +@@ -78,7 +78,8 @@ + void teardown_speech() { + + bonobo_object_release_unref (speaker, NULL); +- CORBA_free (voices); ++ if (voices != NULL && voices->_length != 0) ++ CORBA_free (voices); + CORBA_exception_free (&ev); + + } -- cgit