~lubuntu-dev/lxde/libfm

« back to all changes in this revision

Viewing changes to src/base/fm-file-launcher.c

  • Committer: GitHub
  • Author(s): tsujan
  • Date: 2017-11-06 10:56:15 UTC
  • mfrom: (2815.1.1)
  • Revision ID: git-v1:0f144841966d90371f6de5741f55aedea354a9b5
Merge pull request #34 from lxde/fix_launcher

Fix crash on launching nonexistent link targets

Show diffs side-by-side

added added

removed removed

Lines of Context:
142
142
    /* if we do fm_job_run_sync_with_mainloop() then we should unlock
143
143
       GDK threads before main loop but the libfm in GDK independent
144
144
       therefore we cannot use the fm_job_run_sync_with_mainloop() here */
145
 
    if (fm_job_run_sync(FM_JOB(job)))
146
 
        fi = fm_file_info_ref(fm_file_info_list_peek_head(job->file_infos));
 
145
    if (fm_job_run_sync(FM_JOB(job))) {
 
146
        FmFileInfo* file_info = fm_file_info_list_peek_head(job->file_infos);
 
147
        if (file_info) {
 
148
            fi = fm_file_info_ref(file_info);
 
149
        }
 
150
    }
147
151
    g_signal_handlers_disconnect_by_func(job, on_query_target_info_error, &data);
148
152
    g_object_unref(job);
149
153
    return fi;