diff --git a/3rdparty/qocoa/qsearchfield_mac.mm b/3rdparty/qocoa/qsearchfield_mac.mm index 36684cc63..6c628a3d0 100644 --- a/3rdparty/qocoa/qsearchfield_mac.mm +++ b/3rdparty/qocoa/qsearchfield_mac.mm @@ -89,8 +89,9 @@ public: -(void)controlTextDidEndEditing:(NSNotification*)notification { // No Q_ASSERT here as it is called on destruction. - if (pimpl) - pimpl->textDidEndEditing(); + if (!pimpl) return; + + pimpl->textDidEndEditing(); if ([[[notification userInfo] objectForKey:@"NSTextMovement"] intValue] == NSReturnTextMovement) pimpl->returnPressed();