mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-02 22:26:59 +02:00
BF: RoomViewController: Fixed crash reported by GA
This commit is contained in:
@@ -346,8 +346,16 @@
|
||||
if ([AppDelegate theDelegate].visibleRoomId)
|
||||
{
|
||||
[AppDelegate theDelegate].visibleRoomId = nil;
|
||||
|
||||
[[AppDelegate theDelegate] removeObserver:self forKeyPath:@"isOffline"];
|
||||
|
||||
// Sanity check: Use a try..catch to prevent the app from crashing if there is no
|
||||
// registered observer which happens if the provided self.roomDataSource is unexpectedly nil
|
||||
@try
|
||||
{
|
||||
[[AppDelegate theDelegate] removeObserver:self forKeyPath:@"isOffline"];
|
||||
}
|
||||
@catch (id anException)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user