title: Need help to solve error in drawing histogram in root
body: <p>this is my code I am checked it many times but it gives me an error when I run it.</p>
  <pre><code>TFile *f=new TFile(&quot;hist.root&quot;);
           TH1F *h = (TH1F*)f-&gt;Get(&quot;Phi_mu&quot;);
     auto c1= new TCanvas();             
       h-&gt;Draw();
  </code></pre>
  <p>this is the error message</p>
  <pre><code>///Error in &lt;HandleInterpreterException&gt;: Trying to dereference null pointer or trying to call routine taking non-null arguments.
  Execution of your code was aborted.
  In file included from input_line_113:1:
  .C:21:3: warning: null passed to a callee that requires a non-null argument [-Wnonnull]
           h-&gt;Draw();
  </code></pre>
  <p>can anyone tell me what is the wrong</p>