 {
   nlist_t *current = notif_list_head;
 
-  while(current->next != NULL)
+  if(!current)
+    return NULL;
+
+  while(current->next)
     current = current->next;
 
   return current;

{
  nlist_t *current = notif_list_head;

  while(current != NULL)
  {
    if(current->notification == notif)
      break;

      if(handle_idle_buttons(id))
        enable_backlight();
      break;

    case DISPLAY_NOTIFICATIONS:
      if(handle_notification_buttons(id))
        enable_backlight();
      break;

    default:
      return;
  }
