{
if(aTableColumn != nil && [[aTableColumn identifier] intValue] == 2)
{
- hb_chapter_t *chapter = hb_list_item( fTitle->list_chapter, rowIndex );
-
- if( chapter != NULL )
+ if( fTitle )
{
- strncpy( chapter->title, [anObject UTF8String], 1023);
- chapter->title[1023] = '\0';
+ hb_chapter_t *chapter = hb_list_item( fTitle->list_chapter, rowIndex );
+
+ if( chapter != NULL )
+ {
+ strncpy( chapter->title, [anObject UTF8String], 1023);
+ chapter->title[1023] = '\0';
+ }
}
}
}
objectValueForTableColumn:(NSTableColumn *)aTableColumn
row:(int)rowIndex
{
- NSString *cellEntry;
+ NSString *cellEntry = @"__DATA ERROR__";
if([[aTableColumn identifier] intValue] == 1)
{
}
else
{
- hb_chapter_t *chapter = hb_list_item( fTitle->list_chapter, rowIndex );
-
- if( chapter != NULL )
+ if( fTitle )
{
- cellEntry = [NSString stringWithUTF8String:chapter->title];
- }
- else
- {
- cellEntry = @"__DATA ERROR__";
+ hb_chapter_t *chapter = hb_list_item( fTitle->list_chapter, rowIndex );
+
+ if( chapter != NULL )
+ {
+ cellEntry = [NSString stringWithUTF8String:chapter->title];
+ }
}
}
-
+
return cellEntry;
}