Daniel Brötzmann pushed to branch master at gajim / gajim


Commits:
9754351c by wurstsalat at 2024-11-23T18:06:44+01:00
cfix: ChatStack: Account for None in file drop

- - - - -


1 changed file:

- gajim/gtk/chat_stack.py


Changes:

=====================================
gajim/gtk/chat_stack.py
=====================================
@@ -740,8 +740,12 @@ def _on_drop_accept(self, _target: Gtk.DropTarget, drop: 
Gdk.Drop) -> bool:
         return bool(formats.contain_gtype(Gdk.FileList))
 
     def _on_file_drop(
-        self, _target: Gtk.DropTarget, value: Gdk.FileList, _x: float, _y: 
float
+        self, _target: Gtk.DropTarget, value: Gdk.FileList | None, _x: float, 
_y: float
     ) -> bool:
+        if value is None:
+            log.debug("Drop received, but value is None")
+            return False
+
         log.debug("Drop received: %s", value)
         files = value.get_files()
         if not files:



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/9754351c1a91c70610f4c0da1effdfa70fe247ae

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/9754351c1a91c70610f4c0da1effdfa70fe247ae
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to