macOS: Implement isEqual for VLCRendererItem
[vlc.git] / modules / gui / macosx / VLCRendererItem.m
index f9ebe69..614f866 100644 (file)
@@ -44,6 +44,7 @@
 - (void)dealloc
 {
     vlc_renderer_item_release(_rendererItem);
+    _rendererItem = nil;
 }
 
 - (NSString*)name
     var_SetString(playlist , "sout", sout.UTF8String);
 }
 
+- (BOOL)isEqual:(id)object
+{
+    if (![object isKindOfClass:[VLCRendererItem class]]) {
+        return NO;
+    }
+    VLCRendererItem *other = object;
+    return (other.rendererItem == self.rendererItem);
+}
+
 @end