Skip to content

Commit 2136dd3

Browse files
leolost2605zeebok
andauthored
LauncherManager: Fix crash when dnd a non desktop file (#272)
Co-authored-by: Ryan Kornheisl <[email protected]>
1 parent ef413ec commit 2136dd3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/LauncherManager.vala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@
7070
var file = (File) drop_target_file.get_value ().get_object ();
7171
var app_info = new DesktopAppInfo.from_filename (file.get_path ());
7272

73+
if (app_info == null) {
74+
return;
75+
}
76+
7377
if (app_info.get_id () in id_to_app) {
7478
id_to_app[app_info.get_id ()].pinned = true;
7579
drop_target_file.reject ();

0 commit comments

Comments
 (0)