mirror of
https://github.com/moparisthebest/Yaaic
synced 2025-01-08 12:18:07 -05:00
ConversationActivity: onCreate(): Check if server is returned by getServerById() - Fixes #55
This commit is contained in:
parent
9387a02068
commit
4e266e1bb7
@ -132,6 +132,12 @@ public class ConversationActivity extends Activity implements ServiceConnection,
|
|||||||
|
|
||||||
serverId = getIntent().getExtras().getInt("serverId");
|
serverId = getIntent().getExtras().getInt("serverId");
|
||||||
server = Yaaic.getInstance().getServerById(serverId);
|
server = Yaaic.getInstance().getServerById(serverId);
|
||||||
|
|
||||||
|
// Finish activity if server does not exist anymore - See #55
|
||||||
|
if (server == null) {
|
||||||
|
this.finish();
|
||||||
|
}
|
||||||
|
|
||||||
setTitle("Yaaic - " + server.getTitle());
|
setTitle("Yaaic - " + server.getTitle());
|
||||||
|
|
||||||
setContentView(R.layout.conversations);
|
setContentView(R.layout.conversations);
|
||||||
|
Loading…
Reference in New Issue
Block a user