Skip to content

wayland: add error handling for QFile::open failure in org_kde_plasma_window_get_icon

Vlad Zahorodnii requested to merge work/cherry-pick-e4a272e1 into Plasma/6.1

when creating a QDataStream object, if the file has not been successfully opened before (file.open() fails), the created QDataStream object 'ds' may not function properly. If you continue to perform the operation 'ds << icon;' in this case, it may cause kwin to crash. Therefore, it is essential to ensure that the file has been successfully opened before creating the QDataStream object.

Signed-off-by: likai likai@kylinos.cn

(cherry picked from commit e4a272e1)

Co-authored-by: Kai Li likai@kylinos.cn

Merge request reports

Loading