Only release context if we own it


Otherwise we release the context that is owned by the QtQuick rendering
engine which leads to assert failures and crashes in the single threaded
case.

Change-Id: I5f5e03bbe43a0990a29d41b2fc96e714668d85fc
Pick-to: 5.15
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
commit2e627f8ce77e5c184742234416da88e6393fd2c1
parent5a33b94b348e5c65155b526e7746d9fe45560959
authorMike Krus <mike.krus@kdab.com>
committerMike Krus <mike.krus@kdab.com>
commit timeWed, 23 Sep 2020 17:51:23 +0100