Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-10-20 05:51:33 +0300
committerCampbell Barton <campbell@blender.org>2022-10-20 05:57:43 +0300
commitc58d6b30add69fc3c6004d2ad2a590d7d44cc83b (patch)
tree4c8e1b5090c7d66afdb5642807eaab9d34fad126
parente2a93e9c7c5fece5ea7d46da949694ad2eca872e (diff)
GHOST/Wayland: correct assert from recent commit
Error in [0], only clear the stored clipboard data source pointer if it matches the data being cleared. [0]: 09e3ea49dbbec15a8fcc79cc609f6dc8c13bc91f
-rw-r--r--intern/ghost/intern/GHOST_SystemWayland.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/intern/ghost/intern/GHOST_SystemWayland.cpp b/intern/ghost/intern/GHOST_SystemWayland.cpp
index 5c3f807d678..4b3f3ec5ef2 100644
--- a/intern/ghost/intern/GHOST_SystemWayland.cpp
+++ b/intern/ghost/intern/GHOST_SystemWayland.cpp
@@ -1284,8 +1284,9 @@ static void data_source_handle_cancelled(void *data, struct wl_data_source *wl_d
CLOG_INFO(LOG, 2, "cancelled");
GWL_Seat *seat = static_cast<GWL_Seat *>(data);
GWL_DataSource *data_source = seat->data_source;
- GHOST_ASSERT(seat->data_source->wl_data_source == wl_data_source, "Data source mismatch!");
- data_source->wl_data_source = nullptr;
+ if (seat->data_source->wl_data_source == wl_data_source) {
+ data_source->wl_data_source = nullptr;
+ }
wl_data_source_destroy(wl_data_source);
}