Mercurial > pidgin
comparison plugins/timestamp_format.c @ 13054:fd57413bc421
[gaim-migrate @ 15416]
Add some guards so we don't crash. Luke is seeing a crash here. I think the problem might be in the signals code, but I don't really know.
committer: Tailor Script <tailor@pidgin.im>
| author | Richard Laager <rlaager@wiktel.com> |
|---|---|
| date | Sat, 28 Jan 2006 00:26:18 +0000 |
| parents | c1317074fce3 |
| children | b553326bc468 |
comparison
equal
deleted
inserted
replaced
| 13053:d50c330e8089 | 13054:fd57413bc421 |
|---|---|
| 88 { | 88 { |
| 89 gboolean force = gaim_prefs_get_bool( | 89 gboolean force = gaim_prefs_get_bool( |
| 90 "/plugins/gtk/timestamp_format/force_24hr"); | 90 "/plugins/gtk/timestamp_format/force_24hr"); |
| 91 const char *dates = gaim_prefs_get_string( | 91 const char *dates = gaim_prefs_get_string( |
| 92 "/plugins/gtk/timestamp_format/use_dates/conversation"); | 92 "/plugins/gtk/timestamp_format/use_dates/conversation"); |
| 93 | |
| 94 g_return_val_if_fail(conv != NULL, NULL); | |
| 95 g_return_val_if_fail(tm != NULL, NULL); | |
| 96 | |
| 93 return timestamp_cb_common(conv, tm, force, dates); | 97 return timestamp_cb_common(conv, tm, force, dates); |
| 94 } | 98 } |
| 95 | 99 |
| 96 static char *log_timestamp_cb(GaimLog *log, | 100 static char *log_timestamp_cb(GaimLog *log, |
| 97 const struct tm *tm, gpointer data) | 101 const struct tm *tm, gpointer data) |
| 98 { | 102 { |
| 99 gboolean force = gaim_prefs_get_bool( | 103 gboolean force = gaim_prefs_get_bool( |
| 100 "/plugins/gtk/timestamp_format/force_24hr"); | 104 "/plugins/gtk/timestamp_format/force_24hr"); |
| 101 const char *dates = gaim_prefs_get_string( | 105 const char *dates = gaim_prefs_get_string( |
| 102 "/plugins/gtk/timestamp_format/use_dates/log"); | 106 "/plugins/gtk/timestamp_format/use_dates/log"); |
| 107 | |
| 108 g_return_val_if_fail(log != NULL, NULL); | |
| 109 g_return_val_if_fail(tm != NULL, NULL); | |
| 103 | 110 |
| 104 if (log->type == GAIM_LOG_SYSTEM) | 111 if (log->type == GAIM_LOG_SYSTEM) |
| 105 { | 112 { |
| 106 if (force) | 113 if (force) |
| 107 { | 114 { |
