I am seeing same the very same (line 247) error as reported for D6 in http://drupal.org/node/283623
I have installed only core gallery module, and no gallery block is enabled,
The module header reads: gallery.module,v 1.26.2.37 2008/03/28

Error is reported, but then /gallery/v/myalbum is rendered correctly
/admin/settings reads:
* Gallery2 API version: 7.54 / 1.4
* Overall Status (Installation): [Error] (don't know why... it used to be ok before)

admin/settings/gallery/install now results in a blank page and error
"Call to a member function getId() on a non-object " is reported again.