Ecore_X(cb): Make sure we have argv[i] before we try to strlen it.

SVN revision: 64302
This commit is contained in:
Christopher Michael 2011-10-22 18:06:44 +00:00
parent 3cf77b0b30
commit 880a34d2a6
1 changed files with 2 additions and 2 deletions

View File

@ -25,8 +25,8 @@ ecore_x_icccm_command_set(Ecore_X_Window win,
LOGFN(__FILE__, __LINE__, __FUNCTION__);
CHECK_XCB_CONN;
for (i = 0, nbytes = 0; i < argc; i++)
nbytes += strlen(argv[i]) + 1;
for (i = 0, nbytes = 0; i < argc; i++)
if (argv[i]) nbytes += strlen(argv[i]) + 1;
buf = malloc(sizeof(char) * nbytes);
if (!buf) return;