summaryrefslogtreecommitdiff
path: root/libparted/exception.c
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2008-04-24 17:46:28 -0300
committerOtavio Salvador <otavio@ossystems.com.br>2008-04-26 20:44:57 -0300
commitc092d19ecdd04f0805e52b7671b91678a2bb74e2 (patch)
tree2660f63feab63c14c1c705740711caa42a132bdd /libparted/exception.c
parentabc24c32fc7bca23d9cd2b82b1bcafec6c4b5f21 (diff)
downloadparted-c092d19ecdd04f0805e52b7671b91678a2bb74e2.tar.gz
do not loop in case message exception has no message
The exception handler was looping when the exception had no message.
Diffstat (limited to 'libparted/exception.c')
-rw-r--r--libparted/exception.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libparted/exception.c b/libparted/exception.c
index c9a50bb..5fb3c79 100644
--- a/libparted/exception.c
+++ b/libparted/exception.c
@@ -242,7 +242,7 @@ ped_exception_throw (PedExceptionType ex_type,
ex->type = ex_type;
ex->options = ex_opts;
- while (1) {
+ while (message) {
ex->message = (char*) malloc (size * sizeof (char));
if (!ex->message)
goto no_memory;