Fix #1333: Protect against -g for non-generating code.
diff --git a/StandAlone/StandAlone.cpp b/StandAlone/StandAlone.cpp
index bb38e1c..044662f 100644
--- a/StandAlone/StandAlone.cpp
+++ b/StandAlone/StandAlone.cpp
@@ -729,6 +729,9 @@
 //
 void CompileShaders(glslang::TWorklist& worklist)
 {
+    if (Options & EOptionDebug)
+        Error("cannot generate debug information unless linking to generate code");
+
     glslang::TWorkItem* workItem;
     if (Options & EOptionStdin) {
         worklist.remove(workItem);