do not crash if passed rect as value is nil

This commit is contained in:
Riccardo Mottola 2025-04-17 02:30:05 +02:00
parent 4f255d2750
commit 53a85514c1

View file

@ -2830,9 +2830,14 @@ in the main thread.
- (void) _setNeedsDisplayInRect_real: (NSValue *)v
{
NSRect invalidRect = [v rectValue];
NSRect invalidRect;
NSView *currentView = _super_view;
if (nil == v)
return;
invalidRect = [v rectValue];
/*
* Limit to bounds, combine with old _invalidRect, and then check to see
* if the result is the same as the old _invalidRect - if it isn't then