1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2025-07-31 21:59:25 -04:00

Check for nil before updating.

This commit is contained in:
Qball Cow 2015-12-01 13:17:59 +01:00
parent 544229d975
commit ff52140697

View file

@ -92,8 +92,10 @@ static char **get_dmenu ( unsigned int *length )
break; break;
} }
} }
retv[( *length ) + 1] = NULL; if(retv != NULL ) {
retv = g_realloc ( retv, ( *length + 1 ) * sizeof ( char* ) ); retv[( *length ) + 1] = NULL;
retv = g_realloc ( retv, ( *length + 1 ) * sizeof ( char* ) );
}
TICK_N ( "Read stdin STOP" ); TICK_N ( "Read stdin STOP" );
return retv; return retv;
} }