[Bf-blender-cvs] [c58d6b30add] master: GHOST/Wayland: correct assert from recent commit

Campbell Barton noreply at git.blender.org
Thu Oct 20 05:00:14 CEST 2022


Commit: c58d6b30add69fc3c6004d2ad2a590d7d44cc83b
Author: Campbell Barton
Date:   Thu Oct 20 13:51:33 2022 +1100
Branches: master
https://developer.blender.org/rBc58d6b30add69fc3c6004d2ad2a590d7d44cc83b

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

===================================================================

M	intern/ghost/intern/GHOST_SystemWayland.cpp

===================================================================

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);
 }



More information about the Bf-blender-cvs mailing list