PR python/16324 points out that comparing a frame id to null_frame_id
can never succeed, and proposes simply removing the dead code.  That
is what this patch does.
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=16324
                                 "be set on a dummy frame."));
            }
          else
-           {
-             frame_id = get_frame_id (prev_frame);
-             if (frame_id == null_frame_id)
-               PyErr_SetString (PyExc_ValueError,
-                                _("Invalid ID for the `frame' object."));
-           }
+           frame_id = get_frame_id (prev_frame);
        }
     }
   catch (const gdb_exception &except)