Skip to content

Commit

Permalink
issue a warning and return NULL (rather than error) for attempts to c…
Browse files Browse the repository at this point in the history
…reate multiple graphics devices
  • Loading branch information
jjallaire committed Jan 5, 2012
1 parent 1dc03ca commit 61ea10a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/cpp/r/session/graphics/RGraphicsDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,11 @@ SEXP createGD()
{
// error if there is already an RStudio device
if (s_pGEDevDesc != NULL)
Rf_error("Only one RStudio graphics device is permitted");
{
Rf_warning("Only one RStudio graphics device is permitted");
return R_NilValue;
}


R_CheckDeviceAvailable();

Expand Down

0 comments on commit 61ea10a

Please sign in to comment.