mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-21 04:45:31 +08:00
No assert but empty URL and verify if sApp has been deleted
This commit is contained in:
@@ -20,6 +20,7 @@
|
|||||||
#include "blackmisc/logcategory.h"
|
#include "blackmisc/logcategory.h"
|
||||||
#include "blackmisc/logcategorylist.h"
|
#include "blackmisc/logcategorylist.h"
|
||||||
#include "blackmisc/logmessage.h"
|
#include "blackmisc/logmessage.h"
|
||||||
|
#include "blackmisc/verify.h"
|
||||||
|
|
||||||
#include <QByteArray>
|
#include <QByteArray>
|
||||||
#include <QJsonDocument>
|
#include <QJsonDocument>
|
||||||
@@ -503,7 +504,9 @@ namespace BlackCore
|
|||||||
|
|
||||||
CUrl CDatabaseReader::getBaseUrl(CDbFlags::DataRetrievalModeFlag mode) const
|
CUrl CDatabaseReader::getBaseUrl(CDbFlags::DataRetrievalModeFlag mode) const
|
||||||
{
|
{
|
||||||
Q_ASSERT_X(sApp, Q_FUNC_INFO, "Missing app object, URLs cannot be obtained");
|
BLACK_VERIFY_X(sApp, Q_FUNC_INFO, "Missing app object, URLs cannot be obtained");
|
||||||
|
if (!sApp) { return CUrl(); }
|
||||||
|
|
||||||
switch (mode)
|
switch (mode)
|
||||||
{
|
{
|
||||||
case CDbFlags::DbReading:
|
case CDbFlags::DbReading:
|
||||||
|
|||||||
Reference in New Issue
Block a user