From fad0ccc8c679cb288d7484450b7d04403d8ad0fd Mon Sep 17 00:00:00 2001 From: Arnaud Bienner Date: Sat, 14 Mar 2015 01:38:03 +0100 Subject: [PATCH] Fix a crash that will sometime occur on exit on Mac, caused by my recent changes --- 3rdparty/qocoa/qsearchfield_mac.mm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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();