diff --git a/modules/gui/macosx/VLCDefaultValueSlider.m b/modules/gui/macosx/VLCDefaultValueSlider.m index 16e689a46721f644be2be2c05531a982daee75ca..8e6ae1c7a912f926786b9e31c1df1fc80113b18a 100644 --- a/modules/gui/macosx/VLCDefaultValueSlider.m +++ b/modules/gui/macosx/VLCDefaultValueSlider.m @@ -30,9 +30,8 @@ { self = [super initWithCoder:coder]; if (self) { - if (![self.cell isKindOfClass:[VLCDefaultValueSliderCell class]]) { - self.cell = [[VLCDefaultValueSliderCell alloc] init]; - } + NSAssert([self.cell isKindOfClass:[VLCDefaultValueSliderCell class]], + @"VLCDefaultSlider cell is not VLCDefaultValueSliderCell"); _isScrollable = YES; } return self; diff --git a/modules/gui/macosx/VLCSlider.m b/modules/gui/macosx/VLCSlider.m index 787721ecf3d060cb690496399a08ae4d966816ff..245c4faab07a6ceeb95a272ff3beeae73287f58b 100644 --- a/modules/gui/macosx/VLCSlider.m +++ b/modules/gui/macosx/VLCSlider.m @@ -31,9 +31,8 @@ self = [super initWithCoder:coder]; if (self) { - if (![self.cell isKindOfClass:[VLCSliderCell class]]) { - self.cell = [[VLCSliderCell alloc] init]; - } + NSAssert([self.cell isKindOfClass:[VLCSliderCell class]], + @"VLCSlider cell is not VLCSliderCell"); } return self; } @@ -49,14 +48,6 @@ [super setNeedsDisplayInRect:[self bounds]]; } -- (void)awakeFromNib { - [super awakeFromNib]; - - if(![self.cell isKindOfClass:[VLCSliderCell class]]) { - self.cell = [[VLCSliderCell alloc] init]; - } -} - - (BOOL)getIndefinite { return [(VLCSliderCell*)[self cell] indefinite]; diff --git a/modules/gui/macosx/VLCVolumeSlider.m b/modules/gui/macosx/VLCVolumeSlider.m index 300dbdf54512a122156249e81d5886816b0d4adb..b912f9c7c4434a399bfde01a3b0ceb3e03f1efaf 100644 --- a/modules/gui/macosx/VLCVolumeSlider.m +++ b/modules/gui/macosx/VLCVolumeSlider.m @@ -32,9 +32,8 @@ self = [super initWithCoder:coder]; if (self) { - if (![self.cell isKindOfClass:[VLCVolumeSliderCell class]]) { - self.cell = [[VLCVolumeSliderCell alloc] init]; - } + NSAssert([self.cell isKindOfClass:[VLCVolumeSliderCell class]], + @"VLCVolumeSlider cell is not VLCVolumeSliderCell"); } return self; }