From b883e6075bd76f979fbffdb768313665681315a0 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Tue, 19 Feb 2019 20:17:59 +0100 Subject: Only plot when a Picture object is there grConvert is not needed for plotting --- R/chent.R | 1 + 1 file changed, 1 insertion(+) (limited to 'R/chent.R') diff --git a/R/chent.R b/R/chent.R index 6a5abc7..c80cf06 100644 --- a/R/chent.R +++ b/R/chent.R @@ -463,6 +463,7 @@ draw_svg.chent = function(x, width = 300, height = 150, #' @example inst/examples/caffeine.R #' @export plot.chent = function(x, ...) { + if (is.null(x$Picture)) stop("No Picture object in chent, was RDKit available during creation?") grid.picture(x$Picture) } -- cgit v1.2.1