mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-03 08:05:12 +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) {
|
for (const auto &format : supportedFormats) {
|
||||||
if (auto result = GtkSelectionDataPointer(
|
if (auto result = GtkSelectionDataPointer(
|
||||||
gtk_clipboard_wait_for_contents(clipboard, format))
|
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;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user