Changeset 22247 for titan/plugins


Ignore:
Timestamp:
07/06/13 10:57:19 (11 years ago)
Author:
nit
Message:

[titan] fix possible segfault in tithek fav

File:
1 edited

Legend:

Unmodified
Added
Removed
  • titan/plugins/tithek/tithek.h

    r22243 r22247  
    21002100                                }
    21012101                                drawscreen(grid, 0, 0);
    2102 //                              sleep(1);
    21032102                        }                       
    21042103                }
    21052104                else if(rcret == getrcconfigint("rcyellow", NULL) && ostrcmp(title, "TiThek - Favoriten") == 0)
    21062105                {
    2107                         if(textbox(_("Message"), _("Remove this Favorite ?"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 5, 0) == 1)
    2108                         {
    2109                                 removefav(((struct tithek*)listbox->select->handle)->title, ((struct tithek*)listbox->select->handle)->link, ((struct tithek*)listbox->select->handle)->pic, ((struct tithek*)listbox->select->handle)->localname, ((struct tithek*)listbox->select->handle)->menutitle, ((struct tithek*)listbox->select->handle)->flag);             
    2110                                 int pagecount = createtithekplay(titheklink, grid, listbox, countlabel, 0);
    2111                                 if(pagecount == 0) return;
    2112                                        
    2113                                 drawscreen(grid, 0, 0);
     2106                        if(listbox->select != NULL && listbox->select->handle != NULL)
     2107                        {
     2108                                if(textbox(_("Message"), _("Remove this Favorite ?"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 5, 0) == 1)
     2109                                {
     2110                                        removefav(((struct tithek*)listbox->select->handle)->title, ((struct tithek*)listbox->select->handle)->link, ((struct tithek*)listbox->select->handle)->pic, ((struct tithek*)listbox->select->handle)->localname, ((struct tithek*)listbox->select->handle)->menutitle, ((struct tithek*)listbox->select->handle)->flag);             
     2111                                        int pagecount = createtithekplay(titheklink, grid, listbox, countlabel, 0);
     2112                                        if(pagecount == 0) return;
     2113                                               
     2114                                        drawscreen(grid, 0, 0);
     2115                                }
    21142116                        }
    21152117                }
    21162118                else if(rcret == getrcconfigint("rcgreen", NULL) && ostrcmp(title, "TiThek - Favoriten") != 0)
    21172119                {
    2118                         if(textbox(_("Message"), _("Add this link as Favorite ?"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 5, 0) == 1)
    2119                         {
    2120                                 addfav(((struct tithek*)listbox->select->handle)->title, ((struct tithek*)listbox->select->handle)->link, ((struct tithek*)listbox->select->handle)->pic, ((struct tithek*)listbox->select->handle)->localname, ((struct tithek*)listbox->select->handle)->menutitle, ((struct tithek*)listbox->select->handle)->flag);         
     2120                        if(listbox->select != NULL && listbox->select->handle != NULL)
     2121                        {
     2122                                if(textbox(_("Message"), _("Add this link as Favorite ?"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 5, 0) == 1)
     2123                                {
     2124                                        addfav(((struct tithek*)listbox->select->handle)->title, ((struct tithek*)listbox->select->handle)->link, ((struct tithek*)listbox->select->handle)->pic, ((struct tithek*)listbox->select->handle)->localname, ((struct tithek*)listbox->select->handle)->menutitle, ((struct tithek*)listbox->select->handle)->flag);         
     2125                                }
    21212126                        }
    21222127                }
Note: See TracChangeset for help on using the changeset viewer.