ekiga r6247 - in trunk: . lib/engine/components/gmconf-personal-details
- From: jpuydt svn gnome org
- To: svn-commits-list gnome org
- Subject: ekiga r6247 - in trunk: . lib/engine/components/gmconf-personal-details
- Date: Wed, 7 May 2008 15:32:00 +0100 (BST)
Author: jpuydt
Date: Wed May 7 14:31:59 2008
New Revision: 6247
URL: http://svn.gnome.org/viewvc/ekiga?rev=6247&view=rev
Log:
Fixed crashers : std::string initialized to NULL
Modified:
trunk/ChangeLog
trunk/lib/engine/components/gmconf-personal-details/gmconf-personal-details.cpp
Modified: trunk/lib/engine/components/gmconf-personal-details/gmconf-personal-details.cpp
==============================================================================
--- trunk/lib/engine/components/gmconf-personal-details/gmconf-personal-details.cpp (original)
+++ trunk/lib/engine/components/gmconf-personal-details/gmconf-personal-details.cpp Wed May 7 14:31:59 2008
@@ -49,10 +49,14 @@
gpointer data)
{
PersonalDetails *details = (PersonalDetails *) data;
+ const gchar *name = NULL;
- if (gm_conf_entry_get_type (entry) == GM_CONF_STRING)
- details->set_display_name (gm_conf_entry_get_string (entry));
-
+ if (gm_conf_entry_get_type (entry) == GM_CONF_STRING) {
+
+ name = gm_conf_entry_get_string (entry);
+ if (name != NULL)
+ details->set_display_name (name);
+ }
}
static void
@@ -61,10 +65,14 @@
gpointer data)
{
PersonalDetails *details = (PersonalDetails *) data;
+ const gchar *status = NULL;
+
+ if (gm_conf_entry_get_type (entry) == GM_CONF_STRING) {
- if (gm_conf_entry_get_type (entry) == GM_CONF_STRING)
- details->set_short_status (gm_conf_entry_get_string (entry));
-
+ status = gm_conf_entry_get_string (entry);
+ if (status != NULL)
+ details->set_short_status (status);
+ }
}
static void
@@ -73,12 +81,17 @@
gpointer data)
{
PersonalDetails *details = (PersonalDetails *) data;
+ const gchar *status = NULL;
- if (gm_conf_entry_get_type (entry) == GM_CONF_STRING)
- details->set_long_status (gm_conf_entry_get_string (entry));
+ if (gm_conf_entry_get_type (entry) == GM_CONF_STRING) {
+
+ status = gm_conf_entry_get_string (entry);
+ if (status != NULL)
+ details->set_long_status (status);
+ }
}
-PersonalDetails::PersonalDetails ()
+PersonalDetails::PersonalDetails ()
{
gm_conf_notifier_add ("/apps/ekiga/general/personal_data/full_name",
display_name_changed_nt, this);
@@ -90,4 +103,3 @@
gm_conf_notifier_trigger ("/apps/ekiga/general/personal_data/short_status");
gm_conf_notifier_trigger ("/apps/ekiga/general/personal_data/long_status");
}
-
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]