GNOME Bugzilla – Bug 720706
userList: Don't crash if not channel for room
Last modified: 2014-02-28 13:53:30 UTC
Since we can have rooms withouth channel, trying to count the number uf users ifnot channel is set for the room causes a crash. Just ignore the count if room doesn't have channel.
Created attachment 264505 [details] [review] userList: Don't crash if not channel for room
Created attachment 264507 [details] [review] userList: Don't crash if not channel for room Since we can have rooms withouth channel, trying to count the number uf users if not channel is set for the room causes a crash. Just ignore the count if room doesn't have channel.
Created attachment 264508 [details] [review] userList: Don't crash if not channel for room Since we can have rooms withouth channel, trying to count the number of users if not channel is set for the room causes a crash. Just ignore the count calculation if room doesn't have channel.
Review of attachment 264508 [details] [review]: Sorry for the late review - my gut reaction was "why are we trying to update that count anyway in that case?". Apparently we get this error, but I was a bit lazy of looking into it :-) So while the user list will be closed and disabled when the connection is lost, we will also clear out the list box in _onChannelChanged() - which then triggers the header function to run. So yeah, we should get rid of those warnings. However I don't see much of a point in setting the label to anything - after all, we will never show it. So I'd suggest to either return early from the header function when this._room.channel is unset, or set/unset the header function itself in _onChannelChanged().
Created attachment 270558 [details] [review] userList: Don't update header if not channel for room Since we can have rooms withouth channel, trying to count the number of users if not channel is set for the room causes a warning. Just ignore don't add the header if there's not channel for room.
Created attachment 270559 [details] [review] userList: Don't update header if not channel Since we can have rooms withouth channel, trying to count the number of users if not channel is set for the room causes a warning. Just ignore don't add the header if there's not channel for room.
Review of attachment 270559 [details] [review]: Some nits in the commit message: - withouth -> without - if not channel -> if no channel - ignore don't add -> "ignore" or "don't add" (the former is slightly more correct, as we leave whatever header was set before and just ignore any updates) - not channel for room -> no channel for the room Fine to push with a fixed message.
(In reply to comment #7) > Review of attachment 270559 [details] [review]: > > Some nits in the commit message: > - withouth -> without > - if not channel -> if no channel > - ignore don't add -> "ignore" or "don't add" (the former is slightly more > correct, as we leave whatever header was set before and just ignore any > updates) > - not channel for room -> no channel for the room > > Fine to push with a fixed message. Sorry, I'll try to be more cautious with such errors.