fixed warning about measuring NULL string that Elliot pointed out

fixed warning about measuring NULL string that Elliot pointed out
This commit is contained in:
Andy Hertzfeld 2000-02-14 17:20:54 +00:00
parent b3342238ff
commit bc961a704b
3 changed files with 11 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2000-02-14 Andy Hertzfeld <andy@eazel.com>
*src/nautilus-index-tabs.c:
Fixed warning about measuring NULL string that Elliot pointed out
2000-02-14 Elliot Lee <sopwith@redhat.com>
* src/ntl-window-msgs.c: Revert.
* components/help/hyperbola-nav-index.c: More work.

View file

@ -318,7 +318,10 @@ draw_or_hit_test_all_tabs(NautilusIndexTabs *index_tabs, gboolean draw_flag, gin
if (index_tabs->details->title_mode && !draw_flag)
{
gint edge_width = tab_left_edge->art_pixbuf->width + tab_right_edge->art_pixbuf->width;
if (index_tabs->details->title == NULL)
return -1;
name_width = gdk_string_width(tab_font, index_tabs->details->title) - (2 * TAB_INDENT);
index_tabs->details->total_height = total_height;
if ((test_x >= TITLE_TAB_OFFSET) && (test_x < (TITLE_TAB_OFFSET + name_width + edge_width)))
return 0;
return -1;

View file

@ -318,7 +318,10 @@ draw_or_hit_test_all_tabs(NautilusIndexTabs *index_tabs, gboolean draw_flag, gin
if (index_tabs->details->title_mode && !draw_flag)
{
gint edge_width = tab_left_edge->art_pixbuf->width + tab_right_edge->art_pixbuf->width;
if (index_tabs->details->title == NULL)
return -1;
name_width = gdk_string_width(tab_font, index_tabs->details->title) - (2 * TAB_INDENT);
index_tabs->details->total_height = total_height;
if ((test_x >= TITLE_TAB_OFFSET) && (test_x < (TITLE_TAB_OFFSET + name_width + edge_width)))
return 0;
return -1;