fix: exception when there is no active profile
This commit is contained in:
@@ -119,9 +119,13 @@ class ConnectionNotifier extends _$ConnectionNotifier with AppLogger {
|
|||||||
|
|
||||||
Future<void> _connect() async {
|
Future<void> _connect() async {
|
||||||
final activeProfile = await ref.read(activeProfileProvider.future);
|
final activeProfile = await ref.read(activeProfileProvider.future);
|
||||||
|
if (activeProfile == null) {
|
||||||
|
loggy.info("no active profile, not connecting");
|
||||||
|
return;
|
||||||
|
}
|
||||||
await _connectionRepo
|
await _connectionRepo
|
||||||
.connect(
|
.connect(
|
||||||
activeProfile!.id,
|
activeProfile.id,
|
||||||
activeProfile.name,
|
activeProfile.name,
|
||||||
ref.read(disableMemoryLimitProvider),
|
ref.read(disableMemoryLimitProvider),
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user