mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Don't call gtk_selection_data_get_length on nullptr
This commit is contained in:
@@ -110,7 +110,7 @@ std::vector<uchar> GetImageFromClipboard() {
|
||||
for (const auto &format : supportedFormats) {
|
||||
if (auto result = GtkSelectionDataPointer(
|
||||
gtk_clipboard_wait_for_contents(clipboard, format))
|
||||
; gtk_selection_data_get_length(result.get()) > 0) {
|
||||
; result && gtk_selection_data_get_length(result.get()) > 0) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user