Skip to content
Snippets Groups Projects
Commit 635fde2d authored by Stephen R. van den Berg's avatar Stephen R. van den Berg
Browse files

pgsql: Clip _sprintf() in destructed objects.

parent f4cfa71b
No related branches found
No related tags found
No related merge requests found
...@@ -86,6 +86,8 @@ private Thread.Mutex resyncmux; ...@@ -86,6 +86,8 @@ private Thread.Mutex resyncmux;
protected string _sprintf(int type) { protected string _sprintf(int type) {
string res; string res;
if (!this) // Not in destructed objects
return "";
switch(type) { switch(type) {
case 'O': case 'O':
res = sprintf(DRIVERNAME"(%s@%s:%d/%s,%d,%d)", res = sprintf(DRIVERNAME"(%s@%s:%d/%s,%d,%d)",
......
...@@ -717,6 +717,8 @@ outer: ...@@ -717,6 +717,8 @@ outer:
private string _sprintf(int type) { private string _sprintf(int type) {
string res; string res;
if (!this) // Not in destructed objects
return "";
switch (type) { switch (type) {
case 'O': case 'O':
int fd = -1; int fd = -1;
...@@ -822,6 +824,8 @@ class sql_result { ...@@ -822,6 +824,8 @@ class sql_result {
protected string _sprintf(int type) { protected string _sprintf(int type) {
string res; string res;
if (!this) // Not in destructed objects
return "";
switch (type) { switch (type) {
case 'O': case 'O':
int fd = -1; int fd = -1;
...@@ -1822,6 +1826,8 @@ class proxy { ...@@ -1822,6 +1826,8 @@ class proxy {
private string _sprintf(int type) { private string _sprintf(int type) {
string res; string res;
if (!this) // Not in destructed objects
return "";
switch (type) { switch (type) {
case 'O': case 'O':
res = sprintf(DRIVERNAME".proxy(%s@%s:%d/%s,%d,%d)", res = sprintf(DRIVERNAME".proxy(%s@%s:%d/%s,%d,%d)",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment