From c9b885ffd4e3f01943d08488722abd7fbb539e61 Mon Sep 17 00:00:00 2001 From: Andrei Kortunov Date: Sat, 9 Jan 2021 14:24:04 +0400 Subject: [PATCH] Avoid possible null dereferencing --- apps/opencs/view/world/dragdroputils.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/opencs/view/world/dragdroputils.cpp b/apps/opencs/view/world/dragdroputils.cpp index 789d4f33dc..808125a601 100644 --- a/apps/opencs/view/world/dragdroputils.cpp +++ b/apps/opencs/view/world/dragdroputils.cpp @@ -20,7 +20,8 @@ CSMWorld::UniversalId CSVWorld::DragDropUtils::getAcceptedData(const QDropEvent { if (canAcceptData(event, type)) { - return getTableMimeData(event)->returnMatching(type); + if (const CSMWorld::TableMimeData *data = getTableMimeData(event)) + return data->returnMatching(type); } return CSMWorld::UniversalId::Type_None; }