mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Don't call gtk_selection_data_get_length on nullptr
This commit is contained in:
parent
2c6e4eed19
commit
62fd968409
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue