Fixed a crash when unchecking share this player. Also trying to make the
[MenuTunes.git] / NetworkObject.m
index 4473970..a29c3f5 100755 (executable)
@@ -24,6 +24,7 @@
 - (id)init
 {
     if ( (self = [super init]) ) {
+        _valid = YES;
         if (![self requiresPassword]) {
             _authenticated = YES;
         } else {
@@ -35,7 +36,7 @@
 
 - (ITMTRemote *)remote
 {
-    if (_authenticated) {
+    if (_authenticated && _valid) {
         return [[MainController sharedController] currentRemote];
     } else {
         return nil;
     }
 }
 
+- (void)invalidate
+{
+    _valid = NO;
+}
+
+- (BOOL)isValid
+{
+    return _valid;
+}
+
 @end