Avoid null pointer dereference and remove unused variable
This commit is contained in:
parent
dd7d6aa484
commit
d441df289c
1 changed files with 2 additions and 2 deletions
|
@ -278,7 +278,7 @@ keynav_failed (GtkIconView *current_view,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (direction == GTK_DIR_DOWN && v->next != NULL)
|
if (direction == GTK_DIR_DOWN && v != NULL && v->next != NULL)
|
||||||
{
|
{
|
||||||
new_view = v->next->data;
|
new_view = v->next->data;
|
||||||
|
|
||||||
|
@ -315,7 +315,7 @@ keynav_failed (GtkIconView *current_view,
|
||||||
res = TRUE;
|
res = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (direction == GTK_DIR_UP && v->prev != NULL)
|
if (direction == GTK_DIR_UP && v != NULL && v->prev != NULL)
|
||||||
{
|
{
|
||||||
new_view = v->prev->data;
|
new_view = v->prev->data;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue