diff options
-rw-r--r-- | graphviz.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/graphviz.lua b/graphviz.lua index 14115cb..9b2afdb 100644 --- a/graphviz.lua +++ b/graphviz.lua @@ -148,6 +148,9 @@ function graph.graphvizLayout(g, algorithm) end function graph.graphvizFile(g, algorithm, fname) + if not graphvizOk or not cgraphOk then + error("graphviz library could not be loaded.") + end algorithm = algorithm or 'dot' local _,_,rendertype = fname:reverse():find('(%a+)%.%w+') rendertype = rendertype:reverse() |