summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@qt.io>2016-06-15 14:07:33 +0200
committerJake Petroules <jake.petroules@qt.io>2016-10-15 22:14:28 +0000
commitb00565bc2803bb783e8f2b0d02becfa73323e283 (patch)
tree9d5462bed1d9372d66b23fb45615b8b7d8787574 /src
parent6370c3aa719bd7c1327cef88d263841ba28bb010 (diff)
iOS: check if qApp is still valid before accessing it
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ø <tor.arne.vestbo@qt.io> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/ios/qiostextinputoverlay.mm3
1 files changed, 2 insertions, 1 deletions
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()