mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
Mobile: catch null references in DownloadDCThread
There are reported crashes on Android that suggest a null "tables" attribute in DownloadDCThread. This should never happen, as the table() function connected to this attribute returns the address of a subobject. Thus, even if the original DownloadThread is null, this would not return a null pointer (the subobject is not at address 0). Catch these null-object accesses and write a warning message to the console. Hopefully, this will help is localizing the problem. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
0cce3ef2a8
commit
f3acb0ca02
1 changed files with 4 additions and 0 deletions
|
@ -28,6 +28,10 @@ Kirigami.Page {
|
|||
id: downloadThread
|
||||
|
||||
onFinished : {
|
||||
if (!table || !sites) {
|
||||
console.warn("DCDownloadThread::onFinished(): table or sites is null!")
|
||||
return
|
||||
}
|
||||
importModel.repopulate(table, sites)
|
||||
progressBar.visible = false
|
||||
if (dcImportModel.rowCount() > 0) {
|
||||
|
|
Loading…
Reference in a new issue