Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/graph.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--graphviz.lua3
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()