GUAC-236: Handle dispose of buffers.

This commit is contained in:
Michael Jumper 2016-02-27 15:26:47 -08:00
parent 36b625818d
commit dea754d846

View File

@ -39,8 +39,12 @@ int guacenc_handle_dispose(guacenc_display* display, int argc, char** argv) {
/* Parse arguments */ /* Parse arguments */
int index = atoi(argv[0]); int index = atoi(argv[0]);
/* Dispose of layer */ /* If non-negative, dispose of layer */
return guacenc_display_free_layer(display, index); if (index >= 0)
return guacenc_display_free_layer(display, index);
/* Otherwise, we're referring to a buffer */
return guacenc_display_free_buffer(display, index);
} }