summaryrefslogtreecommitdiffstats
path: root/Telegram/SourceFiles/platform/linux/linux_gtk_integration.cpp
diff options
context:
space:
mode:
authorIlya Fedin <fedin-ilja2010@ya.ru>2021-07-08 22:34:34 +0400
committerJohn Preston <johnprestonmail@gmail.com>2021-07-08 22:09:26 +0300
commit62fd968409d0032fb617121ba2a4d00970b8510f (patch)
tree18993c7a62eb25d34b338e0417459b2a0f77eaa5 /Telegram/SourceFiles/platform/linux/linux_gtk_integration.cpp
parent2c6e4eed19fae97ac343e8471be048678123d6aa (diff)
Don't call gtk_selection_data_get_length on nullptr
Diffstat (limited to 'Telegram/SourceFiles/platform/linux/linux_gtk_integration.cpp')
-rw-r--r--Telegram/SourceFiles/platform/linux/linux_gtk_integration.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Telegram/SourceFiles/platform/linux/linux_gtk_integration.cpp b/Telegram/SourceFiles/platform/linux/linux_gtk_integration.cpp
index 8b4eb26c2c..49a770c55f 100644
--- a/Telegram/SourceFiles/platform/linux/linux_gtk_integration.cpp
+++ b/Telegram/SourceFiles/platform/linux/linux_gtk_integration.cpp
@@ -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;
}
}