diff --git a/src/java/org/apache/cassandra/tools/NodeCmd.java b/src/java/org/apache/cassandra/tools/NodeCmd.java
index <HASH>..<HASH> 100644
--- a/src/java/org/apache/cassandra/tools/NodeCmd.java
+++ b/src/java/org/apache/cassandra/tools/NodeCmd.java
@@ -209,11 +209,15 @@ public class NodeCmd
      */
     public void printInfo(PrintStream outs)
     {
+        boolean gossipInitialized = probe.isInitialized();
         outs.println(probe.getToken());
-        outs.printf("%-17s: %s%n", "Gossip active", probe.isInitialized());
+        outs.printf("%-17s: %s%n", "Gossip active", gossipInitialized);
         outs.printf("%-17s: %s%n", "Load", probe.getLoadString());
-        outs.printf("%-17s: %s%n", "Generation No", probe.getCurrentGenerationNumber());
-        
+        if (gossipInitialized)
+            outs.printf("%-17s: %s%n", "Generation No", probe.getCurrentGenerationNumber());
+        else
+            outs.printf("%-17s: %s%n", "Generation No", 0);
+
         // Uptime
         long secondsUp = probe.getUptime() / 1000;
         outs.printf("%-17s: %d%n", "Uptime (seconds)", secondsUp);
Fix NPE in nodetool when gossip isn't initialized.
Patch by brandonwilliams, reviewed by jbellis for CASSANDRA-<I>

git-svn-id: <URL>