Fix crash bug in project command lister

master
Allen Webster 2020-12-30 16:36:59 -08:00
parent 4d4f345365
commit 7b7b7df7b8
2 changed files with 5 additions and 3 deletions

View File

@ -1339,8 +1339,10 @@ get_project_command_from_user(Application_Links *app, Project *project, String_C
Lister_Result l_result = run_lister(app, lister);
if (!l_result.canceled){
Project_Command *result_proj_cmd = (Project_Command*)l_result.user_data;
String_Const_u8 cmd_name = prj_sanitize_string(scratch, result_proj_cmd->name);
result = prj_command_from_name(app, cmd_name);
if (result_proj_cmd != 0){
String_Const_u8 cmd_name = prj_sanitize_string(scratch, result_proj_cmd->name);
result = prj_command_from_name(app, cmd_name);
}
}
}

View File

@ -436,7 +436,7 @@ static Command_Metadata fcoder_metacmd_table[250] = {
{ PROC_LINKS(profile_disable, 0), false, "profile_disable", 15, "Prevent 4coder's self profiler from gathering new profiling information.", 72, "W:\\4ed\\code\\custom\\4coder_profile.cpp", 37, 219 },
{ PROC_LINKS(profile_enable, 0), false, "profile_enable", 14, "Allow 4coder's self profiler to gather new profiling information.", 65, "W:\\4ed\\code\\custom\\4coder_profile.cpp", 37, 212 },
{ PROC_LINKS(profile_inspect, 0), true, "profile_inspect", 15, "Inspect all currently collected profiling information in 4coder's self profiler.", 80, "W:\\4ed\\code\\custom\\4coder_profile_inspect.cpp", 45, 886 },
{ PROC_LINKS(project_command_lister, 0), false, "project_command_lister", 22, "Open a lister of all commands in the currently loaded project.", 62, "W:\\4ed\\code\\custom\\4coder_project_commands.cpp", 46, 1350 },
{ PROC_LINKS(project_command_lister, 0), false, "project_command_lister", 22, "Open a lister of all commands in the currently loaded project.", 62, "W:\\4ed\\code\\custom\\4coder_project_commands.cpp", 46, 1352 },
{ PROC_LINKS(project_fkey_command, 0), false, "project_fkey_command", 20, "Run an 'fkey command' configured in a project.4coder file. Determines the index of the 'fkey command' by which function key or numeric key was pressed to trigger the command.", 175, "W:\\4ed\\code\\custom\\4coder_project_commands.cpp", 46, 936 },
{ PROC_LINKS(project_go_to_root_directory, 0), false, "project_go_to_root_directory", 28, "Changes 4coder's hot directory to the root directory of the currently loaded project. With no loaded project nothing hapepns.", 125, "W:\\4ed\\code\\custom\\4coder_project_commands.cpp", 46, 962 },
{ PROC_LINKS(query_replace, 0), false, "query_replace", 13, "Queries the user for two strings, and incrementally replaces every occurence of the first string with the second string.", 120, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1282 },