diff options
Diffstat (limited to 'src/cmd/rio/manage.c')
| -rw-r--r-- | src/cmd/rio/manage.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cmd/rio/manage.c b/src/cmd/rio/manage.c index b068a101..07c9d479 100644 --- a/src/cmd/rio/manage.c +++ b/src/cmd/rio/manage.c @@ -320,6 +320,11 @@ getcmaps(Client *c) c->cmapwins = cw; c->wmcmaps = (Colormap*)malloc(n*sizeof(Colormap)); + if (!c->wmcmaps){ + fprintf(stderr, "rio: Failed to allocate memory\n"); + exit(1); + } + for(i = 0; i < n; i++){ if(cw[i] == c->window) c->wmcmaps[i] = c->cmap; |