From b00565bc2803bb783e8f2b0d02becfa73323e283 Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Wed, 15 Jun 2016 14:07:33 +0200 Subject: iOS: check if qApp is still valid before accessing it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When the application quits, the iOS plugin can be told to delete after qApp has been set to null. So we need to add a check for this, to avoid error messages. Change-Id: I687e0b26e0c54fdd5a8539fe0f31b2e756ea92d8 Reviewed-by: Tor Arne Vestbø Reviewed-by: Jake Petroules --- src/plugins/platforms/ios/qiostextinputoverlay.mm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/platforms/ios/qiostextinputoverlay.mm b/src/plugins/platforms/ios/qiostextinputoverlay.mm index d930965bde..54c2e98d71 100644 --- a/src/plugins/platforms/ios/qiostextinputoverlay.mm +++ b/src/plugins/platforms/ios/qiostextinputoverlay.mm @@ -994,7 +994,8 @@ QIOSTextInputOverlay::QIOSTextInputOverlay() QIOSTextInputOverlay::~QIOSTextInputOverlay() { - disconnect(qApp, 0, this, 0); + if (qApp) + disconnect(qApp, 0, this, 0); } void QIOSTextInputOverlay::updateFocusObject() -- cgit v1.2.3