diff options
Diffstat (limited to 'ticket.cxx')
-rw-r--r-- | ticket.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -42,9 +42,11 @@ namespace RTClient { void TicketList::update(rtclient_ticketlist* ticketList) { - for (size_t i = 0; i < ticketList->length; i++) - addTicket(Ticket{ticketList->tickets[i]}); - rtclient_ticket_freelist(ticketList); + if (ticketList) { + for (size_t i = 0; i < ticketList->length; i++) + addTicket(Ticket{ticketList->tickets[i]}); + rtclient_ticket_freelist(ticketList); + } emit updated(); } |