summaryrefslogtreecommitdiffstats
path: root/gtk/src/hb-backend.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2008-09-07 17:06:39 +0000
committerjstebbins <[email protected]>2008-09-07 17:06:39 +0000
commitb97863af3eb0b376403de71d89b070d65b6bbe9b (patch)
tree50d537dbb11c6f1ebd3febf095dc3932401563a6 /gtk/src/hb-backend.c
parent5917f628bf5aa7d6c19aa4bb67588ef064dc709c (diff)
LinGui: Fix several strict-aliasing warnings and a null pointer dereference
that can happen if preferences don't yet exist and your running the app over an ssh session. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1673 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/hb-backend.c')
-rw-r--r--gtk/src/hb-backend.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c
index 8054320e5..44ca2346d 100644
--- a/gtk/src/hb-backend.c
+++ b/gtk/src/hb-backend.c
@@ -688,16 +688,15 @@ ghb_get_title_number(gint titleindex)
{
hb_list_t * list;
hb_title_t * title;
- hb_audio_config_t *audio = NULL;
- if (h_scan == NULL) return 1;
+ if (h_scan == NULL) return 1;
list = hb_get_titles( h_scan );
if( !hb_list_count( list ) )
{
/* No valid title, stop right there */
- return NULL;
+ return 1;
}
- title = hb_list_item( list, titleindex );
+ title = hb_list_item( list, titleindex );
if (title == NULL) return 1; // Bad titleindex
return title->index;
}