SF.net SVN: geany: [1399] trunk/src/keybindings.c

ntrel at users.sourceforge.net ntrel at xxxxx
Thu Mar 15 13:24:27 UTC 2007


Revision: 1399
          http://svn.sourceforge.net/geany/?rev=1399&view=rev
Author:   ntrel
Date:     2007-03-15 06:24:27 -0700 (Thu, 15 Mar 2007)

Log Message:
-----------
Prevent NULL warnings with send to command keybindings.

Modified Paths:
--------------
    trunk/src/keybindings.c

Modified: trunk/src/keybindings.c
===================================================================
--- trunk/src/keybindings.c	2007-03-15 13:14:04 UTC (rev 1398)
+++ trunk/src/keybindings.c	2007-03-15 13:24:27 UTC (rev 1399)
@@ -907,15 +907,15 @@
 			on_to_upper_case1_activate(NULL, NULL);
 			break;
 		case GEANY_KEYS_EDIT_SENDTOCMD1:
-			if (g_strv_length(app->custom_commands) > 0)
+			if (app->custom_commands && g_strv_length(app->custom_commands) > 0)
 				tools_execute_custom_command(idx, app->custom_commands[0]);
 			break;
 		case GEANY_KEYS_EDIT_SENDTOCMD2:
-			if (g_strv_length(app->custom_commands) > 1)
+			if (app->custom_commands && g_strv_length(app->custom_commands) > 1)
 				tools_execute_custom_command(idx, app->custom_commands[1]);
 			break;
 		case GEANY_KEYS_EDIT_SENDTOCMD3:
-			if (g_strv_length(app->custom_commands) > 2)
+			if (app->custom_commands && g_strv_length(app->custom_commands) > 2)
 				tools_execute_custom_command(idx, app->custom_commands[2]);
 			break;
 	}


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list